[Interest] QTableView Column Width and Headers

Michael Jackson mike.jackson at bluequartz.net
Fri May 24 20:39:06 CEST 2024


I have a question about how the column widths of a QTableView are
calculated? How can I have the QTableView set the column with “to contents”
that includes the QHeader also? For example I have a QHeaderView with the
first “section” that has text “This is a really really really long header”,
but the actual data that is in the QTableView under that header are short
values such as “100” or “2” or “1.231”. When the QTableView is rendered the
the column with is only as wide as the QTableView. It is like the
QHeaderView is not taken into account when calculating the width of the
column.

This is with Qt 6.5.3 and 6.6.3.

--
Mike Jackson                    mike.jackson at bluequartz.net
BlueQuartz Software         www.bluequartz.net
President/Owner               Dayton, Ohio
Principal DREAM.3D Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20240524/7220d90b/attachment.htm>


More information about the Interest mailing list