PDA

View Full Version : How to set the sizehint for treeWidget



santosh.kumar
12th June 2007, 11:02
hi

I m creating one treeWidget inside the DockWidget. By default treeWidget width is 512 so it will open in mainwindow with this width....If i will set the sizehint 100 for this treeWidget then by default it should come 100 width...

how i Will set the sizehint for this treeWidget....

wysota
12th June 2007, 11:35
The only way to set the size hint is to subclass the widget and reimplement its sizeHint method. But maybe you can use layouts and horizontalStretch to achieve a simmilar effect without subclassing.