发布时间:2019-07-02 13:36:38编辑:auto阅读(1925)
下面是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种方法
48766
47808
38585
35772
30203
26950
25984
20820
20593
18975
385°
449°
489°
498°
488°
472°
536°
599°
714°
749°