diff options
Diffstat (limited to 'examples/sql/cachedtable/tableeditor.cpp')
-rw-r--r-- | examples/sql/cachedtable/tableeditor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/sql/cachedtable/tableeditor.cpp b/examples/sql/cachedtable/tableeditor.cpp index 216f729..083e5ab 100644 --- a/examples/sql/cachedtable/tableeditor.cpp +++ b/examples/sql/cachedtable/tableeditor.cpp @@ -45,7 +45,7 @@ //! [0] TableEditor::TableEditor(const QString &tableName, QWidget *parent) - : QDialog(parent) + : QWidget(parent) { model = new QSqlTableModel(this); model->setTable(tableName); @@ -59,6 +59,7 @@ TableEditor::TableEditor(const QString &tableName, QWidget *parent) //! [0] //! [1] QTableView *view = new QTableView; view->setModel(model); + view->resizeColumnsToContents(); //! [1] //! [2] |