summaryrefslogtreecommitdiffstats
path: root/examples/tutorials/widgets/nestedlayouts/main.cpp
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-05-20 15:35:01 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-05-20 15:35:01 (GMT)
commitd5fad16bb0810ad2961643b54aef9674224f2509 (patch)
tree1b9f79ddb6b4d071afdb07a74fae563a18497890 /examples/tutorials/widgets/nestedlayouts/main.cpp
parentefb14d56ef9cd327f6358f626f79e3ee88078600 (diff)
downloadQt-d5fad16bb0810ad2961643b54aef9674224f2509.zip
Qt-d5fad16bb0810ad2961643b54aef9674224f2509.tar.gz
Qt-d5fad16bb0810ad2961643b54aef9674224f2509.tar.bz2
Doc: Used QApplication::translate() instead of QObject::tr().
At some point, we may revise this to use plain C strings at first, then introduce the concept of translations. Reviewed-by: Trust Me
Diffstat (limited to 'examples/tutorials/widgets/nestedlayouts/main.cpp')
-rw-r--r--examples/tutorials/widgets/nestedlayouts/main.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/tutorials/widgets/nestedlayouts/main.cpp b/examples/tutorials/widgets/nestedlayouts/main.cpp
index 33f9ad2..226d0f9 100644
--- a/examples/tutorials/widgets/nestedlayouts/main.cpp
+++ b/examples/tutorials/widgets/nestedlayouts/main.cpp
@@ -48,7 +48,8 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
QWidget window;
- QLabel *queryLabel = new QLabel(QObject::tr("Query:"));
+ QLabel *queryLabel = new QLabel(
+ QApplication::translate("nestedlayouts", "Query:"));
QLineEdit *queryEdit = new QLineEdit();
QTableView *resultView = new QTableView();
@@ -67,7 +68,8 @@ int main(int argc, char *argv[])
//! [set up the model]
QStandardItemModel model;
model.setHorizontalHeaderLabels(
- QStringList() << QObject::tr("Name") << QObject::tr("Office"));
+ QStringList() << QApplication::translate("nestedlayouts", "Name")
+ << QApplication::translate("nestedlayouts", "Office"));
QList<QStringList> rows = QList<QStringList>()
<< (QStringList() << "Verne Nilsen" << "123")
@@ -93,7 +95,8 @@ int main(int argc, char *argv[])
resultView->horizontalHeader()->setStretchLastSection(true);
//! [set up the model]
//! [last part]
- window.setWindowTitle(QObject::tr("Nested layouts"));
+ window.setWindowTitle(
+ QApplication::translate("nestedlayouts", "Nested layouts"));
window.show();
return app.exec();
}