[Qt-interest] How does one fix a specific column width in a QTableWidget?

K. Frank kfrank29.c at gmail.com
Sun Mar 7 23:54:42 CET 2010


J-P -

Thanks.

On Sun, Mar 7, 2010 at 5:36 PM, J-P Nurmi <jpnurmi at gmail.com> wrote:
> On Mon, Mar 8, 2010 at 12:08 AM, K. Frank <kfrank29.c at gmail.com> wrote:
>> How can I make s specific column in a QtableWidget (or QTableView)
>> non-resizable?
>> I tried:
>>   tableWidget->horizontalHeader()->setResizeMode (QHeaderView::Fixed);
>> but that made all of the columns non-resizable.
>
> void QHeaderView::setResizeMode ( int logicalIndex, ResizeMode mode )
>

That's it -- just what I was looking for.  (And should have found in
the QHeaderView
class documentation...)


K. Frank




More information about the Qt-interest-old mailing list