PDA

View Full Version : stretch the qtable widget



wissam.h.elkadi@gmail.com
15th September 2015, 11:19
I have another problem after doing this, header then cut like the this image 11373

the second column in the first table is [Manufacturer]
the second column header is [Apical Diameter] and the third column is [Occlusal Diameter]

how can i make the table fit width of both header and content and also the columns resize itself to the widget's width.

thanks

ChrisW67
15th September 2015, 21:13
If the column widths all fit the column contents then you cannot also fit exactly the width of the viewport on the screen.
If you make one or more columns stretch then the columns will stretch to fill the width of the viewport. The width of those columns will no longer be related to their content. If multiple columns can stretch then they share the available width after the other columns are sized. You achieve these settings with a combination of calls to setSectionResizeMode(), and possibly other size controlling/limiting functions, on the horizontal header.

In the first table i would Set section 2 to stretch and the others to resize to contents.