Automatically resize QDockWidget content

I created a dock widget that contains a QTreeView. The size of the tree image remains static when the dock is resized. How can I make it automatically resize to fill the dock area?

I created a dock widget using a constructor and used multiple inheritance to include it in the main application.

Inherited class:

class TreePaneWid : public QDockWidget, protected Ui_TreePaneWid{ public: TreePaneWid(){ setupUi(this); show(); } }; 
+4
source share
1 answer

In the designer, right-click on the dock widget, select Layout, and click Horizontal Layout.

+4
source

Source: https://habr.com/ru/post/1302701/


All Articles