发布时间:2019-07-02 13:36:38编辑:auto阅读(2093)
下面是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种方法
50465
49757
40352
37382
31800
28661
27595
22381
22375
20681
446°
1060°
855°
799°
1042°
915°
1531°
2869°
2566°
1969°