aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/qml/qmlextensionplugins/plugin.cpp2
-rw-r--r--examples/quick/scenegraph/customgeometry/main.cpp2
-rw-r--r--examples/quick/shapes/content/pathitemgallery.qml2
-rw-r--r--examples/quick/shapes/doc/images/qml-shapes-example.pngbin0 -> 49261 bytes
-rw-r--r--examples/quick/shapes/doc/src/shapes.qdoc39
-rw-r--r--examples/quick/textureprovider/main.cpp4
6 files changed, 46 insertions, 3 deletions
diff --git a/examples/qml/qmlextensionplugins/plugin.cpp b/examples/qml/qmlextensionplugins/plugin.cpp
index e04cfa57d8..8e016b8ae5 100644
--- a/examples/qml/qmlextensionplugins/plugin.cpp
+++ b/examples/qml/qmlextensionplugins/plugin.cpp
@@ -82,7 +82,7 @@ protected:
QTime now = QTime::currentTime();
if (now.second() == 59 && now.minute() == time.minute() && now.hour() == time.hour()) {
// just missed time tick over, force it, wait extra 0.5 seconds
- time.addSecs(60);
+ time = time.addSecs(60);
timer.start(60500, this);
} else {
time = now;
diff --git a/examples/quick/scenegraph/customgeometry/main.cpp b/examples/quick/scenegraph/customgeometry/main.cpp
index bbbbf64c4c..6f3c24e87b 100644
--- a/examples/quick/scenegraph/customgeometry/main.cpp
+++ b/examples/quick/scenegraph/customgeometry/main.cpp
@@ -67,6 +67,6 @@ int main(int argc, char **argv)
view.setSource(QUrl("qrc:///scenegraph/customgeometry/main.qml"));
view.show();
- app.exec();
+ return app.exec();
}
//! [1]
diff --git a/examples/quick/shapes/content/pathitemgallery.qml b/examples/quick/shapes/content/pathitemgallery.qml
index 3b418639ee..e871de4c52 100644
--- a/examples/quick/shapes/content/pathitemgallery.qml
+++ b/examples/quick/shapes/content/pathitemgallery.qml
@@ -180,7 +180,7 @@ Rectangle {
color: "darkBlue"
font.pointSize: 12
property variant rendererStrings: [ "Unknown", "Generic (QtGui triangulator)", "GL_NV_path_rendering", "Software (QPainter)" ]
- text: "Active Shape backend: " + rendererStrings[dummyShape.renderer]
+ text: "Active Shape backend: " + rendererStrings[dummyShape.rendererType]
SequentialAnimation on opacity {
NumberAnimation { from: 1; to: 0; duration: 5000 }
PauseAnimation { duration: 5000 }
diff --git a/examples/quick/shapes/doc/images/qml-shapes-example.png b/examples/quick/shapes/doc/images/qml-shapes-example.png
new file mode 100644
index 0000000000..055fc244ea
--- /dev/null
+++ b/examples/quick/shapes/doc/images/qml-shapes-example.png
Binary files differ
diff --git a/examples/quick/shapes/doc/src/shapes.qdoc b/examples/quick/shapes/doc/src/shapes.qdoc
new file mode 100644
index 0000000000..6d0e5e7865
--- /dev/null
+++ b/examples/quick/shapes/doc/src/shapes.qdoc
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+/*!
+ \title Qt Quick Examples - Shapes
+ \example shapes
+ \image qml-shapes-example.png
+ \brief A Qt Quick example demonstrating the use of shape items.
+ \ingroup qtquickexamples
+
+ This example demonstrates the usage of the \l Shape type in Qt Quick. Shapes
+ allow efficiently rendering stroked and filled lines, curves, and arcs in Qt
+ Quick scenes.
+
+ \include examples-run.qdocinc
+*/
diff --git a/examples/quick/textureprovider/main.cpp b/examples/quick/textureprovider/main.cpp
index ea4f73127d..f92d34ada5 100644
--- a/examples/quick/textureprovider/main.cpp
+++ b/examples/quick/textureprovider/main.cpp
@@ -48,6 +48,10 @@ int main(int argc, char* argv[])
QGuiApplication app(argc,argv);
QQuickView view;
+ /*
+ NOTE: ETC compressed textures in PKM files are supported out-of-the-box since Qt 5.10.
+ However, we retain this example to show how custom texture providers can be integrated.
+ */
EtcProvider *provider = new EtcProvider();
provider->setBaseUrl(QUrl("qrc:///textureprovider/"));
view.engine()->addImageProvider("etc", provider);