tags:

views:

267

answers:

1

Probabaly a newbie question here. Is there a way for the user to drag resize QTableWidget? My QTableWidget is nested inside a tab widget, therefore it is not a window by itself. I tried implementing a QSizeGrip, but when I drag resize the grip the entire window resizes and not just the table.

+3  A: 

If you want to allow the user to resize widgets individually, I would suggest using Multiple Document Interface (MDI). This will give each widget its own sub window that the user can move and resize and it is natural since they respond similarly to top-level windows. See this example for details.

Another option you may be looking for is a splitter. The splitter allows you to section the window and allow the user to drag the splitter location, in turn changing the sizes of the sections. See this for details.

In each of these cases, you'll want to use a layout so that the table expands to the size of its container.

Jason
Thank you so much! That's exactly what I was looking for.
GB_J