views:

290

answers:

1

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 TreePaneWid : public QDockWidget, protected Ui_TreePaneWid{
public:
    TreePaneWid(){
        setupUi(this);
        show();
    }
};
+1  A: 

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

Kyle Lutz
That did the trick. Thanks
Gayan
Gayan, if that worked, could you please accept Kyle's answer? :)
Mihai Limbășan
Done. Sorry it took so long.
Gayan