Set column width for QTableWidget in designtime

borisbn picture borisbn · Feb 21, 2013 · Viewed 7.8k times · Source

I cannot find any information for the following question: is there a possibility to set width to columns for QTableWidget in designtime. When I opened ui-file in text editor, I found, that columns are declared like this:

<column>
    <property name="text" >
        <string>My column name</string>
    </property>
</column>

I tried to add some properties like width, but had no success.

The only question I found at qtcentre.org is this. But unfortunaly it is without an answer.

Thank you for advise (even if it would be "You can't").

P.S. Please, do not answer, that I can do it in runtime like this:

table->headerView()->resizeSection( columnIdx, width );

Answer

UmNyobe picture UmNyobe · Feb 21, 2013

It is not possible, at least not with Qt Designer 2.5.2. Designer only offer a limited set of customization.