菜鸟求助:如何在QTabWidget里面的某一页添加东西?
「已注销」 2011-05-02 12:33:31 是这样的,我定义了一个类MainWindow,有三个相关文件 mainwindow.ui, mainwindow.h, mainwindow.cpp
然后在mainwindow.ui框架里面有个QTabWidget,那么里面的每一页都是QWidget,我想放个自己定义的另一个QWidget在其中一页里面,那应该怎样做?
我先添加个QLabel的话,在mainwindow.cpp里面的构造函数内是这样的:
QVBoxLayout *layout = new QVBoxLayout;
QLabel *label= new QLabel("Hello!");
layout -> addWidget(label);
this->heartRateTab->setLayout(layout);
setupUi(this);
createActions();
为什么运行时直接退出。
D:\Qt Projects\Client-build-desktop\debug\Client.exe 启动中...
无法获取调试输出!D:\Qt Projects\Client-build-desktop\debug\Client.exe 退出, 代码: -1073741819