summaryrefslogtreecommitdiffstats
path: root/examples/sql/cachedtable/tableeditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sql/cachedtable/tableeditor.cpp')
-rw-r--r--examples/sql/cachedtable/tableeditor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/sql/cachedtable/tableeditor.cpp b/examples/sql/cachedtable/tableeditor.cpp
index 216f729d6f..083e5abb82 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]