From 0748751c9f097d9d866605306bbdd4b96e2a5c4e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 27 Apr 2011 19:16:41 +0200 Subject: Squashed commit of the changes from the mobile-examples repository (4.7-generated-declarative branch). --- examples/sql/cachedtable/tableeditor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/sql/cachedtable/tableeditor.cpp') 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] -- cgit v1.2.3