上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 18 下一页
摘要: 1 Qt工程转换成VS工程 输入命令行: qmake -tp vc XXX.pro 会生成文件XXX.vcxproj 2将VS工程转为QT工程 (1)右击工程选择生成Pro工程文件 (2)如果没有特殊要求,直接默认选择OK (3)选择默认保存目录 (4)右键工程选择将当前VS工程转为QMake ge 阅读全文
posted @ 2019-05-29 15:47 Truman001 阅读(8387) 评论(0) 推荐(0)
摘要: #ifndef SIM_XMLSTREAMREADER_H_ #define SIM_XMLSTREAMREADER_H_ #include #include class XmlStreamReader { public: XmlStreamReader(); ~XmlStreamReader(); //读取文件 bool ReadFile(const Q... 阅读全文
posted @ 2019-05-29 10:45 Truman001 阅读(2982) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/qq_22642239/article/details/84822485 多字节字符集:使用一个或者多个字节表示一个字符Unicode字符集:统一使用2个字节表示一个字符,其中UTF-8,UTF-16,UTF-32都属于Unicode的编码规则UTF-8: 阅读全文
posted @ 2019-05-28 11:02 Truman001 阅读(661) 评论(0) 推荐(0)
摘要: 在用QT编程时,有时候要实现鼠标右键弹出菜单的功能.下面代码演示鼠标右键弹出菜单. 1.新建一个QT工程,点击MainWindow.ui,鼠标右键Go to slot.....,添加customContextMenuRequested(const QPoint &pos)事件 2.找到属性页中的co 阅读全文
posted @ 2019-05-24 15:45 Truman001 阅读(6237) 评论(0) 推荐(1)
摘要: C++单例模式析构函数的应用 https://blog.csdn.net/realxie/article/details/7090493 C++实现线程安全的单例模式 https://www.cnblogs.com/myd620/p/6133420.html 阅读全文
posted @ 2019-05-22 10:16 Truman001 阅读(1119) 评论(0) 推荐(0)
摘要: //在main函数中加载qss文件 QFile file(QDir::currentPath() + "/ui.qss"); if (file.open(QFile::ReadOnly)) { QString stylesheet = QLatin1String(file.readAll()); qApp->setStyleSheet(stylesheet); file.... 阅读全文
posted @ 2019-05-22 09:21 Truman001 阅读(1114) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/Pig_Pig_Bang/article/details/81632962 阅读全文
posted @ 2019-05-21 17:26 Truman001 阅读(983) 评论(0) 推荐(0)
摘要: 1.visual assistx: C++开发必备2.code alignment: 代码对齐工具,可以对齐等号等,让代码更美观3.ForceUTF8: 文件强制保存为utf-8无bom格式4.Indent Guides: 缩进显示竖线5.VsVIM: vim模拟器 6 AStyle,格式化代码 阅读全文
posted @ 2019-05-21 10:48 Truman001 阅读(216) 评论(0) 推荐(0)
摘要: 在所需页面调用installEventFilter函数,如下: m_processcfg_widget->installEventFilter(this); 阅读全文
posted @ 2019-05-20 18:04 Truman001 阅读(598) 评论(0) 推荐(0)
摘要: 需求: 下拉列表有复选功能 不可编辑 显示所有选中项 关于QComboBox的复选功能有几种方案: QStandardItemModel + QStandardItem QListWidget + QListWidgetItem Model/View + QItemDelegate 当然,还有其它更 阅读全文
posted @ 2019-05-20 17:57 Truman001 阅读(2131) 评论(1) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 18 下一页