smhall316
17th April 2013, 02:44
I am simply adding a QTreeView to a QDockWidget. I want the QDockWidget to resize to the size of the QTreeView. I have tried adding the tree to a widget via layouts. I have tried size policies, etc. etc. I have read that that the QDockWidget resizes to the contents of its item. I can get the size of the tree view and it is certainly not being sized to that by the QDockWidget. This seems like such a silly request, but it I am have an incredibly difficult time getting this to work. Please, no stylesheet solutions. I want to know an elegant programming way to get this QDockWidget to resize. Thanks in advance