Qt4: Placing QMainWindow instance inside other QWidget/QMainWindow

后端 未结 3 1856
感情败类
感情败类 2021-01-05 07:11

I\'d like to place QMainWindow instance inside another QWidget (for example centralWidget of another QMainWindow).

I\'m wondering why it doesn\'t work ? QMainWindow

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-05 07:21

    centralwidget = new QMainWindow(this);
    centralwidget->setWindowFlags(Qt::Widget);
    setCentralWidget(centralwidget);
    

    This should help.

提交回复
热议问题