首页| 论坛| 消息

标题:【提问】qt编写“hello world ”出现错误(已解决)
作者:晋-dragon
日期:2005-11-09 12:08
内容:

源码如下,(文档里的)
#include
#include
in main( int argc, char *argv[])
{
QApplication a( argc, argv);
QPushButton hello( "Hello world!");
hello.resize(100,30 );

hello.show();
return a.exec();
执行步骤:
qmake -project
qmake
之后make,出现下列提示:
test@debian:~/studytest/qttest$ make
make: Nothing to be done for `first'.


#1 [youngki 11-09 13:22]
QPushButton hello("Hello world!",0);
#2 [XChinux 11-09 13:29]
楼主注意发帖的时候自觉把发帖类型加上,要不然还得别人每次给你改。并且你的标题什么意思都表示不了。
#3 [晋-dragon 11-09 14:01]
谢谢老大的提醒,下次注意
程序本身应该没有问题,是我从官方文档里粘贴过来的,qt3.0的文档里有QPushButton hello( "Hello world!",0 )中的“0”,qt4.0里面没有
#4 Re:hello world 问题 [xuxinshao 11-09 14:06]
头文件包含错误
#include
#5 [XChinux 11-09 14:10]
不是QApplication.h
而是qapplication.h
就是说,要么是QApplication
要么是qapplication.h
在Windows下也许能正常用,但在Linux下,大小写区分,必须严格注意。

<< 1 2 >> (1/2)

回复 发表
主题 版块