开发者

Auto resizing of contents of QDockWidget

开发者 https://www.devze.com 2022-12-21 18:18 出处:网络
I\'ve created a dock widget which contains a QTreeView. The size of the tree view remains static when the dock is resized. How can I get it to change it\'s size automatically to fill the dock area?

I've created a dock widget which contains a QTreeView. The size of the tree view remains static when the dock is resized. How can I get it to change it's size automatically to fill the dock area?

I've created the dock widget using the designer and use multiple inheritance to include it in the main app.

Inherited class:

class T开发者_C百科reePaneWid : public QDockWidget, protected Ui_TreePaneWid{
public:
    TreePaneWid(){
        setupUi(this);
        show();
    }
};


In the designer, right click on the dock widget, go to Layout, and click Layout Horizontally.

0

精彩评论

暂无评论...
验证码 换一张
取 消