LinuxSir.cn,穿越时空的Linuxsir!

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

我的程序怎么通不过???

[复制链接]
发表于 2003-11-2 17:21:16 | 显示全部楼层 |阅读模式
#include <qapplication.h>
#include <qpushbutton.h>
int main(int argc, char** argv)
{
        QApplication a(argc,argv);
        QPushButton hello(0);
        hello.resize(200,60);
        hello.setText("我喜欢FreeBSD!");
        a.setMainWidget(&hello);
        hello.show();
        return a.exec();

}
这个程序没错呀!怎么通不过呢?
发表于 2003-11-2 19:23:03 | 显示全部楼层
这个是qt下才能编译的,你用什么编译的啊?
 楼主| 发表于 2003-11-2 19:34:56 | 显示全部楼层

re

qmake生成Makefile文件,然后再make
发表于 2003-11-2 20:35:13 | 显示全部楼层
如果用new给按钮hello,动态赋值呢?

是自己写的pro文件吗?qmake只能将pro文件生成cpp文件吧。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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