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...@qt-project.org
[mailto:interest-bounces+tony=rightsoft.com...@qt-project.org] On Behalf Of
Sujan Dasmahapatra
Sent: Wednesday, 15 May 2013 8:09 PM
To: interest@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

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to