Details
-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
4.6.3, 4.7.0
-
adaa50e37da1fddada874a289792a1bd95c5aebc
Description
When setting the QHeaderView::ResizeToContents in QTableWidget's header, only the items in the current viewport are used to resize the column width. It would be nice if it was possible to set some flag, that would allow to resize the width to fit even the items that are not visible.
A short example reproducing the current behaviour:
#include <QtGui> int main(int argc, char **argv) { QApplication app(argc, argv); QTableWidget *tableWidget = new QTableWidget(255, 13); tableWidget->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); QTableWidgetItem *item11 = new QTableWidgetItem("Some more words."); tableWidget->setItem(10, 0, item11); tableWidget->show(); return app.exec(); }