LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 629|回复: 0

Please have a look!!! About QT

[复制链接]
发表于 2002-12-22 17:08:21 | 显示全部楼层 |阅读模式
#include <qapplication.h>
#include <qpushbutton.h>
#include <qvbox.h>
#include <qfont.h>
int main( int argc, char **argv )
{
    QApplication a( argc, argv );
    QVBox mainwindow;
    mainwindow.resize(200,120);
    QPushButton hello( "Hello world!", &mainwindow );
    hello.resize( 100, 30 );
    QPushButton btnquit( "Some Chinese", &mainwindow );
    btnquit.resize( 100, 30 );
    btnquit.setFont(QFont("Simsun",12,QFont::Bold));
    QObject::connect( &hello, SIGNAL(clicked()), &btnquit,
SLOT(animateClick()));
    QObject::connect( &btnquit, SIGNAL(clicked()), &a,
SLOT(quit()));
    a.setMainWidget( &mainwindow );
    mainwindow.show();
    return a.exec();
}

I don't know why it is luanma???
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表