diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-19 16:35:06 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-19 16:35:06 (GMT) |
commit | 901b0391d15ab72830fcfd73048eeff03fb9ed07 (patch) | |
tree | cf5f2f2eab83301bf08952426f25eb54a90e9ac4 /examples/sql/drilldown/informationwindow.cpp | |
parent | bb4e301ce6762ab300618c579bd65ea1ee17dc2d (diff) | |
parent | 34044853d4315309920a481a585f96ba7b3fb140 (diff) | |
download | Qt-901b0391d15ab72830fcfd73048eeff03fb9ed07.zip Qt-901b0391d15ab72830fcfd73048eeff03fb9ed07.tar.gz Qt-901b0391d15ab72830fcfd73048eeff03fb9ed07.tar.bz2 |
Merge remote branch 'mainline/4.6' into 4.6
Diffstat (limited to 'examples/sql/drilldown/informationwindow.cpp')
-rw-r--r-- | examples/sql/drilldown/informationwindow.cpp | 26 |
1 files changed, 11 insertions, 15 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); } |