qt 在windows vs中编程 为什么说头文件 qvbox.h 找不到 而qfont.h却可以找到 这到底是什么原因呢

清水迎朝阳
博客专家认证
2008-11-12 11:03:41
是不是我用的qt版本高 不配套了?

另 现在qt的头文件都有哪些呢 还是说名称改变了/
...全文
1160 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
olossss 2011-01-15
  • 打赏
  • 举报
回复
正在编译...
main.cpp
.\main.cpp(8) : fatal error C1083: 无法打开包括文件:“q3vbox.h”: No such file or directory
生成日志保存在“file://d:\ogre\example\example\Debug\BuildLog.htm”
example - 1 个错误,0 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
谁解释下
Yjingzhou 2010-04-14
  • 打赏
  • 举报
回复
#include <QApplication.h>
#include <QPushButton.h>
#include <QFont.h>
#include <Q3VBox.h>

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

Q3VBox 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();
}
这样就可以用了。
清水迎朝阳 2008-11-13
  • 打赏
  • 举报
回复
#include <Q3VBox>


用这个还是找不到包

不过用#include<QVBoxLayout> 可以
joyself 2008-11-13
  • 打赏
  • 举报
回复
QVBox类没有了

关于qt的文档,我还是觉得到它自己的官方网站比较好。

http://doc.trolltech.com/4.4/classes.html

http://doc.trolltech.com/3.3/classes.html

在QT4里面可以 Q3VBOX
http://doc.trolltech.com/4.4/q3vbox.html


这里还有篇帖子,可以看看
http://www.cppblog.com/lai3d/archive/2007/07/21/28476.html

23,116

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧