1 类
1需要用到qt的任何东西,那么都声明为一个qt 界面设计师类
2 除非百分百不用到qt的东西,那么声明为C++类
2 QTimer
类中使用
只能在Qt类里面使用,而且还他妈是主线程id调用
QTimer *timer1=new QTimer(this);
timer1->start(500);
connect(timer1,&QTimer::timeout,this,&MainWindow::f1);
connect(timer1,&QTimer::timeout,this,&MainWindow::f2);
cpp中使用
不支持,因为需要Q_OBJECT宏定义