发布时间:2019-07-02 13:36:38编辑:auto阅读(1969)
下面是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种方法
49036
48182
38912
36046
30457
27233
26246
21080
20916
19252
107°
168°
135°
798°
864°
846°
858°
815°
783°
935°