diff options
author | David Boddie <dboddie@trolltech.com> | 2009-05-20 13:37:12 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-05-20 13:37:12 (GMT) |
commit | efb14d56ef9cd327f6358f626f79e3ee88078600 (patch) | |
tree | 96cf779eb1f3fe344c9ff440f858ce184f641a07 /examples/tutorials/widgets/nestedlayouts/main.cpp | |
parent | e28412e4c2389c1765441cec02baed58a63dd29c (diff) | |
download | Qt-efb14d56ef9cd327f6358f626f79e3ee88078600.zip Qt-efb14d56ef9cd327f6358f626f79e3ee88078600.tar.gz Qt-efb14d56ef9cd327f6358f626f79e3ee88078600.tar.bz2 |
Doc: Compile fixes for tutorial examples.
Reviewed-by: Trust Me
Diffstat (limited to 'examples/tutorials/widgets/nestedlayouts/main.cpp')
-rw-r--r-- | examples/tutorials/widgets/nestedlayouts/main.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/tutorials/widgets/nestedlayouts/main.cpp b/examples/tutorials/widgets/nestedlayouts/main.cpp index 29996c6..33f9ad2 100644 --- a/examples/tutorials/widgets/nestedlayouts/main.cpp +++ b/examples/tutorials/widgets/nestedlayouts/main.cpp @@ -46,9 +46,9 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - QWidget *window = new QWidget(); + QWidget window; - QLabel *queryLabel = new QLabel(tr("Query:")); + QLabel *queryLabel = new QLabel(QObject::tr("Query:")); QLineEdit *queryEdit = new QLineEdit(); QTableView *resultView = new QTableView(); @@ -59,14 +59,15 @@ int main(int argc, char *argv[]) QVBoxLayout *mainLayout = new QVBoxLayout(); mainLayout->addLayout(queryLayout); mainLayout->addWidget(resultView); - window->setLayout(mainLayout); + window.setLayout(mainLayout); // Set up the model and configure the view... //! [first part] //! [set up the model] QStandardItemModel model; - model.setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Office")); + model.setHorizontalHeaderLabels( + QStringList() << QObject::tr("Name") << QObject::tr("Office")); QList<QStringList> rows = QList<QStringList>() << (QStringList() << "Verne Nilsen" << "123") @@ -92,8 +93,8 @@ int main(int argc, char *argv[]) resultView->horizontalHeader()->setStretchLastSection(true); //! [set up the model] //! [last part] - window->setWindowTitle(tr("Nested layouts")); - window->show(); + window.setWindowTitle(QObject::tr("Nested layouts")); + window.show(); return app.exec(); } //! [last part] |