当前位置:编程学习 > wap >>

提示#include <qvbox.h> 有误,为什么呢,是QT安装没装好吗?

#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 ();

 }
--------------------编程问答-------------------- 我在vs2010中用Qt,有时候也会提示库包含错误,但是可以编译运行。楼主可以在qt安装目录搜一下这个h文件,如果找不到说明库没安装好! --------------------编程问答-------------------- Path中没有找到 #include <qvbox.h> 这个头

你可以在你工程的.pro文件里添加。
INCLUDEPATH += xxx/xxx/xxx/ 定位到你的qvbox.h所在的文件夹。
补充:移动开发 ,  Qt
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,