diff options
Diffstat (limited to 'examples/widgets/itemviews/spreadsheet/spreadsheet.cpp')
-rw-r--r-- | examples/widgets/itemviews/spreadsheet/spreadsheet.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/widgets/itemviews/spreadsheet/spreadsheet.cpp b/examples/widgets/itemviews/spreadsheet/spreadsheet.cpp index 59d29f0e61..6fab0c2aae 100644 --- a/examples/widgets/itemviews/spreadsheet/spreadsheet.cpp +++ b/examples/widgets/itemviews/spreadsheet/spreadsheet.cpp @@ -64,6 +64,7 @@ SpreadSheet::SpreadSheet(int rows, int cols, QWidget *parent) toolBar->addWidget(formulaInput); table = new QTableWidget(rows, cols, this); + table->setSizeAdjustPolicy(QTableWidget::AdjustToContents); for (int c = 0; c < cols; ++c) { QString character(QChar('A' + c)); table->setHorizontalHeaderItem(c, new QTableWidgetItem(character)); |