MainWindow w2;
QString Starttime = w2.starttime->text();
QString Endtime= w2.endtime->text();
报错信息如下:
src/plot.cpp: In member function 'void Plot::saveToFile()':
src/plot.cpp:222: error: invalid use of incomplete type 'struct QLineEdit'
src/plot.h:17: error: forward declaration of 'struct QLineEdit'
src/plot.cpp:223: error: invalid use of incomplete type 'struct QLineEdit'
src/plot.h:17: error: forward declaration of 'struct QLineEdit'
1、建立父子关系
http://blog.chinaunix.net/uid-29650836-id-4430171.html
2、使用信号与槽机制
http://blog.chinaunix.net/uid-29650836-id-4530957.html
以上链接仅供参考。