[Solved] Auto-resize QTableView column width?
-
Hi,
I have a QTableView in a dialog.
I am using a custom model using QAbstractTableModel along with a custom delegate.
From my model's data() I am returning a QString for each cell.
The problem is that the QTableView is not adjusting the size of cells to show the entire contents of the cell.
So how do I resize the column width so that text from each cell in that column is completely visible?Also is there something similar for QTableWidget?
Thank You. -
Hi,
"This":http://qt-project.org/doc/qt-5.0/qtwidgets/qheaderview.html#ResizeMode-enum what you might be looking for
Hope it helps
-
Hi SGaist!
Thanks thats what I was looking for. :)