• 2165阅读
  • 1回复

[提问]Qt 5.3 下 使用QHBoxLayout 编译错误 [复制链接]

上一主题 下一主题
离线dwx1011
 

只看楼主 正序阅读 楼主  发表于: 2015-08-04
请求帮助,在Qt 5.3的情况下,使用QHBoxLayout 编译错误
错误代码是:
constructor 'Widget::Widget(QWidget*)':
error: cannot allocate an object of abstract type 'QHBoxLayout'


  1. Widget::Widget(QWidget *parent)
  2.     : QWidget(parent)
  3. {
  4.     QHBoxLayout* layout = new QHBoxLayout;
  5.     setLayout(layout);
  6. }

代码很简单
不知道为什么

离线tylan

只看该作者 1楼 发表于: 2015-08-04
我刚才试了试,没有出现你发的问题。
快速回复
限100 字节
 
上一个 下一个