[Interest] TableWidget size dynamically

Tony Rietwyk tony at rightsoft.com.au
Thu May 16 03:41:24 CEST 2013


Have you tried QHeaderView.setResizeMode(int, ResizeMode)?  

 

Note there may be issues depending on the order in which you set the
columns.  I found I had set all of the fixed columns before setting any
stretchable ones. 

 

Tony

 

 

From: interest-bounces+tony=rightsoft.com.au at qt-project.org
[mailto:interest-bounces+tony=rightsoft.com.au at qt-project.org] On Behalf Of
Sujan Dasmahapatra
Sent: Wednesday, 15 May 2013 8:09 PM
To: interest at qt-project.org
Subject: [Interest] TableWidget size dynamically

 

I got a QTableWidget with 3 columns in it. How can I resize the columnwidth
based on resizing my MainWindow. Currently I have set a fixed width for
column using

 

ui.TableWidget->setColumnWidth(0,200);


ui.TableWidget->setColumnWidth(1,200);

ui.TableWidget->setColumnWidth(2,200);

 

Any help is highly appreciated.

-- 

Thanks & Regards

Sujan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130516/0dff6075/attachment.html>


More information about the Interest mailing list