2019年1月24日

c++ 静态变量

摘要: You will need to define the static variable, even if it is not initialized explicitly. That is what is missing in your code. You should have provided 阅读全文

posted @ 2019-01-24 16:53 liujx2019 阅读(299) 评论(0) 推荐(0) 编辑

Display a QMessageBox from a QThread

摘要: Emit a signal. Since you cannot do UI stuff in a Qthread, instead send your message as an argument of your signal. signal decalaration in your qthread 阅读全文

posted @ 2019-01-24 16:49 liujx2019 阅读(263) 评论(0) 推荐(0) 编辑

在 QT 里使用 CreateThread, 执行的函数只能是静态的

摘要: 否则函数的地址未知 阅读全文

posted @ 2019-01-24 15:38 liujx2019 阅读(927) 评论(0) 推荐(0) 编辑

QT 的 parent 该如何理解

摘要: 对话框是GUI程序和用户进行简短交互的顶层窗口,所谓顶层窗口即始终在主窗口之上显示。QDialog是Qt所有类型的对话框窗口的基类,它继承于QWidget,是一种容器类型组件。 QWidget是所有窗口类的抽象,它也可以生成对话框,但是对话框是常见的窗口组件,若每次要使用对话框,都利用QWidget 阅读全文

posted @ 2019-01-24 14:02 liujx2019 阅读(2393) 评论(0) 推荐(0) 编辑

QT 获取可执行程序的路径

摘要: 获取到生成.exe目录 QCoreApplication::applicationDirPath(); 获取当前工程目录 QDir::currentPath() 阅读全文

posted @ 2019-01-24 09:51 liujx2019 阅读(7185) 评论(0) 推荐(0) 编辑

导航