Yoshop
7th September 2017, 16:45
Hello,
I'm using a QTableWidget with 3 columns, and I want the last one to be vertically resized to display all the content with wordWraping.
It's working, but sometimes, depending on the content and the table width (the window can be resized), the word wrap fails !!!
Here an example where it failed :
12576
The text shall end with "[...] AAA BBB CCC", but it's truncated.
- The last column is using all available space, with the property "horizontalHeaderStretchLastSection"
- ElideMode is set to None because I don't want Ellipsis, I want to see all the text
- To have multilines, I set wordWrap Enabled and configure vertical Header to be resized to the content :
ui.tableWidget->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents );
I also tried to manually call resizeRowsToContents() but the result is the same
(I'm using Qt5.4.2)
I made a simple example, you can resize the window to illustrate the issue :
12577
Am I doing something wrong ? Do you have any clues ?
I'm using a QTableWidget with 3 columns, and I want the last one to be vertically resized to display all the content with wordWraping.
It's working, but sometimes, depending on the content and the table width (the window can be resized), the word wrap fails !!!
Here an example where it failed :
12576
The text shall end with "[...] AAA BBB CCC", but it's truncated.
- The last column is using all available space, with the property "horizontalHeaderStretchLastSection"
- ElideMode is set to None because I don't want Ellipsis, I want to see all the text
- To have multilines, I set wordWrap Enabled and configure vertical Header to be resized to the content :
ui.tableWidget->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents );
I also tried to manually call resizeRowsToContents() but the result is the same
(I'm using Qt5.4.2)
I made a simple example, you can resize the window to illustrate the issue :
12577
Am I doing something wrong ? Do you have any clues ?