当前位置: 代码迷 >> QT开发 >> 怎么将QTABWIDGET添加到QWIDGET中
  详细解决方案

怎么将QTABWIDGET添加到QWIDGET中

热度:69   发布时间:2016-04-25 03:10:28.0
如何将QTABWIDGET添加到QWIDGET中
如何将QTABWIDGET添加到QWIDGET中,
在QWIDGET中,
QTabWidget tabWidget;
QHBboxLayout layout=new QHBoxLayout;
layout->addWidget(tabWidget);
this->setLayout(layout);
-------------------------------------------------
error: no matching function for call to 'QHBoxLayout::addWidget(QTabWidget&)'
------解决思路----------------------
可以在创建tablewidget时,将父置为你的QWidget。
比如:
QTableWidget *table = new QTableWidget(yourWidget的指针);
------解决思路----------------------
人家addWidget要指针呢亲……
  相关解决方案