summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-11-18 09:28:59 (GMT)
committeraxis <qt-info@nokia.com>2009-11-18 09:28:59 (GMT)
commitdb3efe5bf4d03d6fcdbf435c2445203bb07475f9 (patch)
tree36da498928e2b27f3b17e9613df08aaa93ce0201 /examples
parent484a6043ef84df3d0d01a19247ea2c89eb8b309f (diff)
parent31d29b227a7609ab0dadca4244cafec919264ba8 (diff)
downloadQt-db3efe5bf4d03d6fcdbf435c2445203bb07475f9.zip
Qt-db3efe5bf4d03d6fcdbf435c2445203bb07475f9.tar.gz
Qt-db3efe5bf4d03d6fcdbf435c2445203bb07475f9.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-staging2
Diffstat (limited to 'examples')
-rw-r--r--examples/sql/drilldown/informationwindow.cpp26
-rw-r--r--examples/sql/drilldown/view.cpp4
2 files changed, 13 insertions, 17 deletions
diff --git a/examples/sql/drilldown/informationwindow.cpp b/examples/sql/drilldown/informationwindow.cpp
index 08fe2ac..a440aad 100644
--- a/examples/sql/drilldown/informationwindow.cpp
+++ b/examples/sql/drilldown/informationwindow.cpp
@@ -83,16 +83,15 @@ InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices,
connect(imageFileEditor, SIGNAL(currentIndexChanged(int)),
this, SLOT(enableButtons()));
- QGridLayout *layout = new QGridLayout;
- layout->addWidget(locationLabel, 0, 0, Qt::AlignLeft | Qt::AlignTop);
- layout->addWidget(countryLabel, 1, 0, Qt::AlignLeft | Qt::AlignTop);
- layout->addWidget(imageFileLabel, 2, 0, Qt::AlignLeft | Qt::AlignTop);
- layout->addWidget(descriptionLabel, 3, 0, Qt::AlignLeft | Qt::AlignTop);
- layout->addWidget(locationText, 0, 1);
- layout->addWidget(countryText, 1, 1);
- layout->addWidget(imageFileEditor, 2, 1);
- layout->addWidget(descriptionEditor, 3, 1);
- layout->addWidget(buttonBox, 4, 0, 1, 2);
+ QFormLayout *formLayout = new QFormLayout;
+ formLayout->addRow(locationLabel, locationText);
+ formLayout->addRow(countryLabel, countryText);
+ formLayout->addRow(imageFileLabel, imageFileEditor);
+ formLayout->addRow(descriptionLabel, descriptionEditor);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addLayout(formLayout);
+ layout->addWidget(buttonBox);
setLayout(layout);
locationId = id;
@@ -101,9 +100,6 @@ InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices,
setWindowFlags(Qt::Window);
enableButtons(false);
setWindowTitle(tr("Office: %1").arg(locationText->text()));
-#ifndef Q_OS_SYMBIAN
- resize(320, sizeHint().height());
-#endif
}
//! [4]
@@ -154,8 +150,8 @@ void InformationWindow::createButtons()
//! [8]
//! [9]
- buttonBox = new QDialogButtonBox;
- buttonBox->addButton(submitButton, QDialogButtonBox::ResetRole);
+ buttonBox = new QDialogButtonBox(this);
+ buttonBox->addButton(submitButton, QDialogButtonBox::AcceptRole);
buttonBox->addButton(revertButton, QDialogButtonBox::ResetRole);
buttonBox->addButton(closeButton, QDialogButtonBox::RejectRole);
}
diff --git a/examples/sql/drilldown/view.cpp b/examples/sql/drilldown/view.cpp
index ff4c511..abc31c9 100644
--- a/examples/sql/drilldown/view.cpp
+++ b/examples/sql/drilldown/view.cpp
@@ -134,7 +134,7 @@ void View::showInformation(ImageItem *image)
#ifndef Q_OS_SYMBIAN
window->show();
#else
- window->showFullScreen();
+ window->showMaximized();
#endif
} else {
InformationWindow *window;
@@ -147,7 +147,7 @@ void View::showInformation(ImageItem *image)
window->move(pos() + QPoint(20, 40));
window->show();
#else
- window->showFullScreen();
+ window->showMaximized();
#endif
informationWindows.append(window);
}