I have a QTableWidget with the horizontalHeader on stretch. If there is a text in one of the cells that is longer than the width of the header, the text is cut off. With QTableWidget the problem can be solved by changing the SectionResizeMode of the verticalHeader to QHeaderView.ResizeToContents. WordWrap then simply increases the height of the cell. With TableWidget, however, the text remains truncated and the height of the cell does not change.
Operation System
Windows 10 22H2
Python Version
3.11.2 64-bit
PyQt/PySide Version
PySide 6.6.3.1
PyQt/PySide-Fluent-Widgets Version
v1.5.8
How to Reproduce?
Create a TableWidget set verticalHeader.SectionResizeMode to QHeaderView.ResizeToContents and add a text to the widget longer than the width of the header section so it should do WordWrap.
What happened?
I have a
QTableWidget
with thehorizontalHeader
on stretch. If there is a text in one of the cells that is longer than the width of the header, the text is cut off. With QTableWidget the problem can be solved by changing theSectionResizeMode
of theverticalHeader
toQHeaderView.ResizeToContents
. WordWrap then simply increases the height of the cell. WithTableWidget
, however, the text remains truncated and the height of the cell does not change.Operation System
Windows 10 22H2
Python Version
3.11.2 64-bit
PyQt/PySide Version
PySide 6.6.3.1
PyQt/PySide-Fluent-Widgets Version
v1.5.8
How to Reproduce?
Create a
TableWidget
setverticalHeader.SectionResizeMode
toQHeaderView.ResizeToContents
and add a text to the widget longer than the width of the header section so it should doWordWrap
.Minimum code