[Interest] TableWidget size dynamically

william.crocker at analog.com william.crocker at analog.com
Thu May 16 02:31:33 CEST 2013


>
> On Wed, May 15, 2013 at 3:08 AM, Sujan Dasmahapatra
> <sujan.dasmahapatra at gmail.com <mailto:sujan.dasmahapatra at gmail.com>> wrote:
>
>     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

Create your own table widget class and derive from QTableWidget.

Overload the resizeEvent(QResizeEvent*) function and in it,
set new column widths based on the new table width
(in addition to calling the base class version.)

I assume the table widget will change size when your main window
changes size.

Bill




More information about the Interest mailing list