发布时间:2019-07-02 13:36:38编辑:auto阅读(2101)
下面是qt3与qt4的举例
qt3下面的源程序是:
#include <qapplication.h>
#include <qpushbutton.h>
#include <qfont.h>
#include <qvbox.h>
int main( int argc, char **argv )
{
}
在qt4中修改为:
#include <qapplication.h>
#include <qpushbutton.h>
#include <qfont.h>
#include <q3vbox.h>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
Q3VBox box;
box.resize( 200, 120 );
QPushButton quit( "Quit", &box );
quit.setFont( QFont( "Times", 18, QFont::Bold ) );
QObject::connect( &quit, SIGNAL(clicked()), &a, SLOT(quit()) );
a.setMainWidget( &box );
box.show();
return a.exec();
}
上一篇: Python Logging 模块完全解
下一篇: web集群时session同步的3种方法
50496
49800
40398
37418
31836
28698
27629
22414
22413
20728
483°
1103°
901°
836°
1083°
959°
1571°
2940°
2619°
2014°