How to manage QSplitter in Qt Designer

后端 未结 2 1606
谎友^
谎友^ 2020-12-29 01:49

When I press a button, I bring up a dialog where user select things and press \'Ok\' at the end. I want a splitter in this dialog. Left pane will show tree and right will sh

2条回答
  •  既然无缘
    2020-12-29 02:29

    You can still create your controls in a .ui file using Qt Designer (integrated in Qt Creator). Within Qt Designer, add a QWidget object to your dialog. Then, from QDialog derived class you'll write, directly in your constructor, create your QSplitter using the QWidget object as a parent.

    This way, you can create all but the splitter object from Qt Designer.

    I think it's also possible to create the QSplitter (as you can create a QButton, QCheckBox...) item directly from Qt Designer.

提交回复
热议问题