[Qt-interest] QTreeView or QTableView size
jani at wbsources.com
jani at wbsources.com
Thu Sep 15 00:23:41 CEST 2011
That only resizes the content, but not the view itself...
I want to grow the table to the minimum size here no scrollbars are visible.
> You might try this:
> QTableView::horizontalHeader()->resizeSections(
> QHeaderView::ResizeToContents);
>
> On Thu, Sep 8, 2011 at 1:58 AM, <jani at wbsources.com> wrote:
>
>> Hello Gents,
>>
>> Is it possible to automatically resize QTableView to its content?
>> Now I set its size to QTableView::horizontalHeader()->height() +
>> counting
>> the lines and calling rowHeight() on all of them. QSizePolicy::Minimum
>> does not seem to affect how my table is sized. Also there is a default
>> minimum size (256x192) for all QTableView even if is set minimum size to
>> to zero.
>>
>> Any help would be greatly appreciated.
>> Thanks.
>>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at qt.nokia.com
>> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>>
>
More information about the Qt-interest-old
mailing list