• 5750阅读
  • 1回复

helloworld运行失败? [复制链接]

上一主题 下一主题
离线xman1978
 

只看楼主 倒序阅读 楼主  发表于: 2007-07-05
helloworld运行失败?
— 本帖被 XChinux 执行加亮操作(2008-07-18) —
我在QT41上运行
#include <qapplication.h>
#include <qpushbutton.h>



int main( int argc, char **argv )
{
    QApplication a( argc, argv );

    QPushButton hello( "Hello world!", 0 );
    hello.resize( 100, 30 );

    a.setMainWidget( &hello );//error
    hello.show();
    return a.exec();
}


    a.setMainWidget( &hello );---提示是什么QT3_support,难道QT不向下兼容吗????
[ 此贴被XChinux在2008-07-18 13:41重新编辑 ]
在线XChinux

只看该作者 1楼 发表于: 2007-07-05
Qt4中没有setMainWidget了
二笔 openSUSE Vim N9 BB10 XChinux@163.com 网易博客 腾讯微博
承接C++/Qt、Qt UI界面、PHP及预算报销系统开发业务
快速回复
限100 字节
 
上一个 下一个