主题 : 我在ubuntu下面编译 *cpp工程,做qt开发时,提示找不到qvbox.h文件,怎么办? 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 19204
精华: 0
发帖: 6
金钱: 30 两
威望: 6 点
综合积分: 12 分
注册时间: 2010-04-17
最后登录: 2015-05-01
楼主  发表于: 2010-10-26 18:27

 我在ubuntu下面编译 *cpp工程,做qt开发时,提示找不到qvbox.h文件,怎么办?

管理提醒: 本帖被 kasim 从 Ubuntu技术交流区 移动到本区(2010-10-27)
我在ubuntu下面编译 *cpp工程,做qt开发时,提示找不到qvbox.h文件,怎么办?
#include <qapplication.h>
#include <qpushbutton.h>
#include <qfont.h>
#include <qvbox.h>

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

    QVBox 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();
}


出错情况:

root@zxb:/home/zhangxiaobo/nfs/project/quit# make
arm-linux-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../qt-arm/build/mkspecs/qws/linux-arm-g++ -I. -I../../../../qt-arm/build/include/QtCore -I../../../../qt-arm/build/include/QtNetwork -I../../../../qt-arm/build/include/QtGui -I../../../../qt-arm/build/include -I. -I. -o main.o main.cpp
main.cpp:4:19: 错误: qvbox.h:没有那个文件或目录
main.cpp: In function ‘int main(int, char**)’:
main.cpp:10: error: ‘QVBox’ was not declared in this scope
main.cpp:10: error: expected `;' before ‘box’
main.cpp:11: error: ‘box’ was not declared in this scope
main.cpp:18: error: ‘class QApplication’ has no member named ‘setMainWidget’
make: *** [main.o] 错误 1
级别: 新手上路
UID: 32116
精华: 0
发帖: 1
金钱: 5 两
威望: 1 点
综合积分: 2 分
注册时间: 2010-11-10
最后登录: 2010-11-10
1楼  发表于: 2010-11-10 15:43

 回 楼主(halimeimei) 的帖子

我也运到这样的问题,怎么办呀???
跌言起伏的人生才能创造伟绩