setLayout: Attempting to set QLayout "" on MainWindow "MainWindow", which already has a layout
2013-07-23 19:35
771 查看
MainWindow::MainWindow(QWidget
*parent)
}
*parent)
: QMainWindow(parent)
{
QString xStr;
xLabel = new QLabel(tr("x():"));
xValueLabel = new QLabel;
xValueLabel->setText(xStr.setNum(x()));
QGridLayout *grdLayout = new QGridLayout;
grdLayout->addWidget(xLabel,0,0);
grdLayout->addWidget(xValueLabel,0,1);
QWidget *widget = new QWidget( this);
widget->setLayout( grdLayout) ;
this->setCentralWidget(widget);
}
相关文章推荐
- QWidget::setLayout: Attempting to set QLayout "" on MainWindow "", which already has a layout
- QWidget::setLayout: Attempting to set QLayout "" on MainWindow "", which already has a layout
- QWidget::setLayout: Attempting to set QLayout "" on MainWindow "", which already has a layout
- setLayout: Attempting to set QLayout "" on MainWindow "MainWindow", which already has a layout
- QWidget::setLayout: Attempting to set QLayout "" on MainWindow "", which already has a layout
- setLayout: Attempting to set QLayout "" on MainWindow "MainWindow", which already has a layout
- Qt提示:setLayout: Attempting to set QLayout "" on MainWindow "MainWindow", which already has a layout
- QWidget::setLayout: Attempting to set QLayout "" on MainWindow "", which already has a layout
- QWidget::setLayout: Attempting to set QLayout "" on MainWindow "", which already has a layout
- setLayout: Attempting to set QLayout "" on MainWindow "MainWindow", which already has a layout
- Qt中使用setLayout()函数时报错------Attempting to set QLayout "" on MainWindow "MainWindow",which already has
- QT Widget::setLayout: Attempting to set QLayout “” on Widget “”, which already has a layout
- Qt:Attempting to add QLayout "" to MainWindow "", which already has a layout
- QLayout: Attempting to add QLayout "" to MyTcpClient "", which already has a layout
- QLayout: Attempting to add QLayout XXX to XXX, which already has a layout
- Attempting to add QLayout "" to MainWindow "", which already has a layout 给QWidget或者QDialog设置布局的时候方
- qt QLayout: Attempting to add QLayout "" to MainWindow "", which already has a layout. 错误
- A factory has already been set on this LayoutInflater
- IAR调试出现the stack plug-in failed to set a breakpoint on "main"
- 遇到了IAR烧写程序出错,附解决办法The stack plug-in failed to set a breakpoint on "main"