diff --git a/doc/src/demos/affine.qdoc b/doc/src/examples/affine.qdoc similarity index 95% rename from doc/src/demos/affine.qdoc rename to doc/src/examples/affine.qdoc index c14a452849..2d70fa8951 100644 --- a/doc/src/demos/affine.qdoc +++ b/doc/src/examples/affine.qdoc @@ -29,7 +29,7 @@ \example painting/affine \title Affine Transformations - In this demo we show Qt's ability to perform affine transformations + In this example we show Qt's ability to perform affine transformations on painting operations. \image affine-demo.png diff --git a/doc/src/examples/books.qdoc b/doc/src/examples/books.qdoc index 64a4613b13..9fa7fdfc8c 100644 --- a/doc/src/examples/books.qdoc +++ b/doc/src/examples/books.qdoc @@ -27,9 +27,9 @@ /*! \example sql/books - \title Books Demonstration + \title Books - The Books demonstration shows how Qt's SQL classes can be used with the model/view + The Books example shows how Qt's SQL classes can be used with the model/view framework to create rich user interfaces for information stored in a database. \image books-demo.png diff --git a/doc/src/examples/styledemo.qdoc b/doc/src/examples/styleexample.qdoc similarity index 96% rename from doc/src/examples/styledemo.qdoc rename to doc/src/examples/styleexample.qdoc index 5a5bb5b47d..f3ab3b17d6 100644 --- a/doc/src/examples/styledemo.qdoc +++ b/doc/src/examples/styleexample.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! - \example embedded/styledemo + \example embedded/styleexample \title Embedded Styles \image styledemo-demo.png diff --git a/doc/src/tutorials/modelview.qdoc b/doc/src/tutorials/modelview.qdoc index 35454f4268..9cbba47b60 100644 --- a/doc/src/tutorials/modelview.qdoc +++ b/doc/src/tutorials/modelview.qdoc @@ -777,7 +777,7 @@ \section2 4.2 Qt Documentation - Qt 4.7 comes with 17 examples and 2 Demonstrations for model/view. + Qt 5.0 comes with 19 examples for model/view. The examples can be found on the \l{Item Views Examples} page. \table @@ -841,6 +841,11 @@ \o QTableView \o QStandardItemModel \o + \row + \o Interview + \o Multiple + \o Custom item model + \o Multiple views \row \o Pixelator \o QTableView @@ -871,24 +876,16 @@ \o QTableView \o QStandardItemModel \o Custom delegate that uses a spin box as a cell editor + \row + \o Spreadsheet + \o {2, 1} QTableView + \o Custom delegates \row \o Star Delegate \o {2, 1} QTableWidget \o Comprehensive custom delegate example. \endtable - \l{Qt Demonstrations}{Demonstrations} are similar to examples except that no - walkthrough is provided for the code. Demonstrations are typically more - feature rich than examples. - - \list - \o The \bold Interview demonstration shows the same model and - selection being shared between three different views. - \o The \bold Spreadsheet demonstration illustrates the use of a - table view as a spreadsheet, using custom delegates to render - each item according to the type of data it contains. - \endlist - A \l{Model/View Programming}{reference document} for model/view technology is also available. */ diff --git a/examples/README b/examples/README index 10e14ceef4..9e781a93a4 100644 --- a/examples/README +++ b/examples/README @@ -1,39 +1,8 @@ -Qt is supplied with a number of example applications and demonstrations that -have been written to provide developers with examples of the Qt API in use, +Qt is supplied with a number of example applications that have been +written to provide developers with examples of the Qt API in use, highlight good programming practice, and showcase features found in each of Qt's core technologies. -The example and demo launcher can be used to explore the different categories -available. It provides an overview of each example, lets you view the -documentation in Qt Assistant, and is able to launch examples and demos. -Documentation for examples can be found in the Tutorials and Examples section +Documentation for examples can be found in the Examples section of the Qt documentation. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/examples/embedded/embedded.pro b/examples/embedded/embedded.pro index 2159b1931a..0063c0038a 100644 --- a/examples/embedded/embedded.pro +++ b/examples/embedded/embedded.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs -SUBDIRS = styledemo raycasting flickable digiflip +SUBDIRS = styleexample raycasting flickable digiflip SUBDIRS += lightmaps SUBDIRS += flightinfo diff --git a/examples/embedded/styledemo/files/add.png b/examples/embedded/styleexample/files/add.png similarity index 100% rename from examples/embedded/styledemo/files/add.png rename to examples/embedded/styleexample/files/add.png diff --git a/examples/embedded/styledemo/files/application.qss b/examples/embedded/styleexample/files/application.qss similarity index 100% rename from examples/embedded/styledemo/files/application.qss rename to examples/embedded/styleexample/files/application.qss diff --git a/examples/embedded/styledemo/files/blue.qss b/examples/embedded/styleexample/files/blue.qss similarity index 100% rename from examples/embedded/styledemo/files/blue.qss rename to examples/embedded/styleexample/files/blue.qss diff --git a/examples/embedded/styledemo/files/khaki.qss b/examples/embedded/styleexample/files/khaki.qss similarity index 100% rename from examples/embedded/styledemo/files/khaki.qss rename to examples/embedded/styleexample/files/khaki.qss diff --git a/examples/embedded/styledemo/files/nature_1.jpg b/examples/embedded/styleexample/files/nature_1.jpg similarity index 100% rename from examples/embedded/styledemo/files/nature_1.jpg rename to examples/embedded/styleexample/files/nature_1.jpg diff --git a/examples/embedded/styledemo/files/nostyle.qss b/examples/embedded/styleexample/files/nostyle.qss similarity index 100% rename from examples/embedded/styledemo/files/nostyle.qss rename to examples/embedded/styleexample/files/nostyle.qss diff --git a/examples/embedded/styledemo/files/remove.png b/examples/embedded/styleexample/files/remove.png similarity index 100% rename from examples/embedded/styledemo/files/remove.png rename to examples/embedded/styleexample/files/remove.png diff --git a/examples/embedded/styledemo/files/transparent.qss b/examples/embedded/styleexample/files/transparent.qss similarity index 100% rename from examples/embedded/styledemo/files/transparent.qss rename to examples/embedded/styleexample/files/transparent.qss diff --git a/examples/embedded/styledemo/main.cpp b/examples/embedded/styleexample/main.cpp similarity index 98% rename from examples/embedded/styledemo/main.cpp rename to examples/embedded/styleexample/main.cpp index 7a484b0365..d3c228a59e 100644 --- a/examples/embedded/styledemo/main.cpp +++ b/examples/embedded/styleexample/main.cpp @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - Q_INIT_RESOURCE(styledemo); + Q_INIT_RESOURCE(styleexample); app.setApplicationName("style"); app.setOrganizationName("Nokia"); diff --git a/examples/embedded/styledemo/styledemo.pro b/examples/embedded/styleexample/styleexample.pro similarity index 62% rename from examples/embedded/styledemo/styledemo.pro rename to examples/embedded/styleexample/styleexample.pro index e005a2f3fe..70942fd444 100644 --- a/examples/embedded/styledemo/styledemo.pro +++ b/examples/embedded/styleexample/styleexample.pro @@ -4,11 +4,11 @@ TEMPLATE = app HEADERS += stylewidget.h FORMS += stylewidget.ui SOURCES += main.cpp stylewidget.cpp -RESOURCES += styledemo.qrc +RESOURCES += styleexample.qrc -target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/styledemo +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/styleexample sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.html -sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/styledemo +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/styleexample INSTALLS += target sources symbian { diff --git a/examples/embedded/styledemo/styledemo.qrc b/examples/embedded/styleexample/styleexample.qrc similarity index 100% rename from examples/embedded/styledemo/styledemo.qrc rename to examples/embedded/styleexample/styleexample.qrc diff --git a/examples/embedded/styledemo/stylewidget.cpp b/examples/embedded/styleexample/stylewidget.cpp similarity index 100% rename from examples/embedded/styledemo/stylewidget.cpp rename to examples/embedded/styleexample/stylewidget.cpp diff --git a/examples/embedded/styledemo/stylewidget.h b/examples/embedded/styleexample/stylewidget.h similarity index 100% rename from examples/embedded/styledemo/stylewidget.h rename to examples/embedded/styleexample/stylewidget.h diff --git a/examples/embedded/styledemo/stylewidget.ui b/examples/embedded/styleexample/stylewidget.ui similarity index 99% rename from examples/embedded/styledemo/stylewidget.ui rename to examples/embedded/styleexample/stylewidget.ui index 767f44aead..ebe2961ec6 100644 --- a/examples/embedded/styledemo/stylewidget.ui +++ b/examples/embedded/styleexample/stylewidget.ui @@ -314,7 +314,7 @@ - + diff --git a/examples/graphicsview/chip/mainwindow.cpp b/examples/graphicsview/chip/mainwindow.cpp index 7476c00ab1..41117c3d47 100644 --- a/examples/graphicsview/chip/mainwindow.cpp +++ b/examples/graphicsview/chip/mainwindow.cpp @@ -78,7 +78,7 @@ MainWindow::MainWindow(QWidget *parent) layout->addWidget(vSplitter); setLayout(layout); - setWindowTitle(tr("Chip Demo")); + setWindowTitle(tr("Chip Example")); } void MainWindow::populateScene() diff --git a/examples/graphicsview/embeddeddialogs/main.cpp b/examples/graphicsview/embeddeddialogs/main.cpp index bca81b8c79..e5defb1471 100644 --- a/examples/graphicsview/embeddeddialogs/main.cpp +++ b/examples/graphicsview/embeddeddialogs/main.cpp @@ -78,6 +78,6 @@ int main(int argc, char *argv[]) view.setBackgroundBrush(QPixmap(":/No-Ones-Laughing-3.jpg")); view.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); view.show(); - view.setWindowTitle("Embedded Dialogs Demo"); + view.setWindowTitle("Embedded Dialogs Example"); return app.exec(); } diff --git a/examples/mainwindows/mainwindow/mainwindow.cpp b/examples/mainwindows/mainwindow/mainwindow.cpp index a58a713c0b..ef1485a147 100644 --- a/examples/mainwindows/mainwindow/mainwindow.cpp +++ b/examples/mainwindows/mainwindow/mainwindow.cpp @@ -64,7 +64,7 @@ #include static const char * const message = - "

Qt Main Window Demo

" + "

Qt Main Window Example

" "

This is a demonstration of the QMainWindow, QToolBar and " "QDockWidget classes.

" @@ -88,7 +88,7 @@ MainWindow::MainWindow(const QMap &customSizeHints, : QMainWindow(parent, flags) { setObjectName("MainWindow"); - setWindowTitle("Qt Main Window Demo"); + setWindowTitle("Qt Main Window Example"); center = new QTextEdit(this); center->setReadOnly(true); diff --git a/examples/painting/affine/xform.cpp b/examples/painting/affine/xform.cpp index ea1916acc8..43f8ce4da1 100644 --- a/examples/painting/affine/xform.cpp +++ b/examples/painting/affine/xform.cpp @@ -895,7 +895,7 @@ XFormWidget::XFormWidget(QWidget *parent) // defaults view->reset(); vectorType->setChecked(true); - textEditor->setText("Qt Affine Transformation Demo"); + textEditor->setText("Qt Affine Transformation Example"); textEditor->setEnabled(false); animateButton->animateClick(); diff --git a/examples/painting/composition/composition.html b/examples/painting/composition/composition.html index 1848ad8bd1..82b8991e8f 100644 --- a/examples/painting/composition/composition.html +++ b/examples/painting/composition/composition.html @@ -1,9 +1,9 @@ -

Demo for composition modes

+

Example for composition modes

- This demo shows some of the more advanced composition modes supported by Qt. + This example shows some of the more advanced composition modes supported by Qt.

diff --git a/examples/richtext/textedit/example.html b/examples/richtext/textedit/example.html index 6327b5f8fc..cdc8d2a23d 100644 --- a/examples/richtext/textedit/example.html +++ b/examples/richtext/textedit/example.html @@ -1,9 +1,9 @@ -QTextEdit Demonstration

QTextEdit

The QTextEdit widget is an advanced editor that supports formatted rich text. It can be used to display HTML and other rich document formats. Internally, QTextEdit uses the QTextDocument class to describe both the high-level structure of each document and the low-level formatting of paragraphs.

-

If you are viewing this document in the textedit demo, you can edit this document to explore Qt's rich text editing features. We have included some comments in each of the following sections to encourage you to experiment.

+

If you are viewing this document in the textedit example, you can edit this document to explore Qt's rich text editing features. We have included some comments in each of the following sections to encourage you to experiment.

Font and Paragraph Styles

QTextEdit supports bold, italic, and underlined font styles, and can display multicolored text. Font families such as Times New Roman and Courier can also be used directly. If you place the cursor in a region of styled text, the controls in the tool bars will change to reflect the current style.

Paragraphs can be formatted so that the text is left-aligned, right-aligned, centered, or fully justified.

diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 8752cb86a7..686f2f023a 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1318,7 +1318,7 @@ void QPainterPrivate::updateState(QPainterState *newState) \o \inlineimage qpainter-compositiondemo.png \o - \bold {Composition Modes Demo} + \bold {Composition Modes Example} The \l {painting/composition}{Composition Modes} example, available in Qt's examples directory, allows you to experiment with the various diff --git a/src/plugins/platforms/uikit/README b/src/plugins/platforms/uikit/README index a101a3ac0b..f878cce50e 100644 --- a/src/plugins/platforms/uikit/README +++ b/src/plugins/platforms/uikit/README @@ -18,11 +18,11 @@ After configuring and building Qt you need to also build src/plugins/platforms/u Simulator: ---------- -configure -qpa -xplatform qws/macx-iphonesimulator-g++ -arch i386 -developer-build -opengl es1 -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations +configure -qpa -xplatform qws/macx-iphonesimulator-g++ -arch i386 -developer-build -opengl es1 -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake docs -nomake examples -nomake translations Device: ------- -configure -qpa -xplatform qws/macx-iphonedevice-g++ -arch armv7 -developer-build -release -opengl es1 -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations +configure -qpa -xplatform qws/macx-iphonedevice-g++ -arch armv7 -developer-build -release -opengl es1 -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake docs -nomake examples -nomake translations 2) XCode setup: - there are examples in the examples subdirectory of the platform plugin diff --git a/tests/benchmarks/corelib/io/qurl/main.cpp b/tests/benchmarks/corelib/io/qurl/main.cpp index ca6ec882f4..7e5035f250 100644 --- a/tests/benchmarks/corelib/io/qurl/main.cpp +++ b/tests/benchmarks/corelib/io/qurl/main.cpp @@ -229,7 +229,7 @@ void tst_qurl::equality() void tst_qurl::qmlPropertyWriteUseCase() { - QUrl base("file:///home/user/qt/demos/declarative/samegame/SamegameCore/"); + QUrl base("file:///home/user/qt/examples/declarative/samegame/SamegameCore/"); QString str("pics/redStar.png"); QBENCHMARK { diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp index e7969d2bee..4c6289ea95 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp @@ -56,7 +56,7 @@ MainWindow::MainWindow(QWidget *parent) layout->addWidget(view); setLayout(layout); - setWindowTitle(tr("Chip Demo")); + setWindowTitle(tr("Chip Example")); } void MainWindow::populateScene() diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp index 994b53e382..c6167e50cb 100644 --- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp +++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp @@ -60,7 +60,7 @@ ChipTester::ChipTester(QWidget *parent) populateScene(); setScene(scene); - setWindowTitle(tr("Chip Demo")); + setWindowTitle(tr("Chip Example")); } void ChipTester::setAntialias(bool enabled)