发布时间:2019-07-02 13:36:38编辑:auto阅读(2102)
下面是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种方法
50523
49835
40427
37438
31859
28728
27657
22435
22434
20748
520°
1144°
928°
861°
1111°
981°
1600°
2978°
2670°
2034°