打开某个项目的时候,编译出现类似的错误 21:46:44: The process "E:\Qt\4.8.5\bin\qmake.exe" exited with code 2. Error while building/deploying project designers (kit: Win-Q Read More
posted @ 2016-06-20 05:14 findumars Views(1428) Comments(0) Diggs(0)
从内存泄露开始? 很简单的入门程序,应该比较熟悉吧 ^_^ #include <QApplication> #include <QLabel> int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel *label Read More
posted @ 2016-06-20 05:13 findumars Views(3577) Comments(0) Diggs(0)
使用QT编程时,当用户自定义了一个类,只要类中使用了信号或槽. Code::Blocks编译就会报错(undefined reference to `vtable for). Google上有很多这个问题的回答,但很多说的很模糊,或者根本就不可行. 其实,QT有自己的编译方法. 不用IDE写一个类, Read More
posted @ 2016-06-20 05:12 findumars Views(2427) Comments(0) Diggs(0)
QWidget类是所有用户界面对象的基类。 窗口部件是用户界面的一个原子:它从窗口系统接收鼠标、键盘和其它事件,并且在屏幕上绘制自己的表现。每一个窗口部件都是矩形,并且它们按Z轴顺序排列的。一个窗口部件可以被它的父窗口部件或者它前面的窗口部件盖住一部分。 QMainWindow 类提供一个有菜单条、 Read More
posted @ 2016-06-20 05:10 findumars Views(362) Comments(0) Diggs(0)
直接发送和接收结构体,例如:struct A {...};struct A objectA;发送的时候: tcpSocket->write((char *)&objectA, sizeof(objectA)); 接收的时候:struct A objectB;tcpSocket->read((char Read More
posted @ 2016-06-20 05:09 findumars Views(1895) Comments(1) Diggs(1)