diff options
author | David Boddie <david.boddie@nokia.com> | 2011-04-28 17:39:11 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-04-28 17:39:11 (GMT) |
commit | 3abaecc3aec4e46f1c5969c33875fd45aa542385 (patch) | |
tree | 58613c5d2b765018c31d0b189e9c5a34d8adde69 /examples/sql/cachedtable | |
parent | ddb22795641253a026b72f752ebc769745dd41be (diff) | |
download | Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.zip Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.gz Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.bz2 |
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/sql/cachedtable')
-rw-r--r-- | examples/sql/cachedtable/cachedtable.desktop | 11 | ||||
-rw-r--r-- | examples/sql/cachedtable/cachedtable.pro | 2 | ||||
-rw-r--r-- | examples/sql/cachedtable/main.cpp | 6 | ||||
-rw-r--r-- | examples/sql/cachedtable/tableeditor.cpp | 3 | ||||
-rw-r--r-- | examples/sql/cachedtable/tableeditor.h | 2 |
5 files changed, 21 insertions, 3 deletions
diff --git a/examples/sql/cachedtable/cachedtable.desktop b/examples/sql/cachedtable/cachedtable.desktop new file mode 100644 index 0000000..aeec353 --- /dev/null +++ b/examples/sql/cachedtable/cachedtable.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Cached Table +Exec=/opt/usr/bin/cachedtable +Icon=cachedtable +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/sql/cachedtable/cachedtable.pro b/examples/sql/cachedtable/cachedtable.pro index 288ec28..7059a1b 100644 --- a/examples/sql/cachedtable/cachedtable.pro +++ b/examples/sql/cachedtable/cachedtable.pro @@ -11,3 +11,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/sql/cachedtable INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/sql/cachedtable/main.cpp b/examples/sql/cachedtable/main.cpp index 26ddc42..ecbf565 100644 --- a/examples/sql/cachedtable/main.cpp +++ b/examples/sql/cachedtable/main.cpp @@ -51,7 +51,11 @@ int main(int argc, char *argv[]) return 1; TableEditor editor("person"); +#if defined(Q_OS_SYMBIAN) + editor.showMaximized(); +#else editor.show(); - return editor.exec(); +#endif + return app.exec(); } //! [0] 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] diff --git a/examples/sql/cachedtable/tableeditor.h b/examples/sql/cachedtable/tableeditor.h index 14d9986..f13bd3d 100644 --- a/examples/sql/cachedtable/tableeditor.h +++ b/examples/sql/cachedtable/tableeditor.h @@ -50,7 +50,7 @@ class QSqlTableModel; QT_END_NAMESPACE //! [0] -class TableEditor : public QDialog +class TableEditor : public QWidget { Q_OBJECT |