aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/accelbubble
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/accelbubble')
-rw-r--r--doc/examples/accelbubble/Bluebubble.svg10
-rw-r--r--doc/examples/accelbubble/accelbubble.pro14
-rw-r--r--doc/examples/accelbubble/main.qml32
3 files changed, 40 insertions, 16 deletions
diff --git a/doc/examples/accelbubble/Bluebubble.svg b/doc/examples/accelbubble/Bluebubble.svg
new file mode 100644
index 0000000000..d9c406c478
--- /dev/null
+++ b/doc/examples/accelbubble/Bluebubble.svg
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny">
+ <defs>
+ <radialGradient id="grad1" cx="0.5" cy="0.7" r="0.7" fx="0.5" fy="0.4">
+ <stop offset="0" style="stop-color:rgb(255,255,255)" />
+ <stop offset="1.5" style="stop-color:rgb(0,102,153)" />
+ </radialGradient>
+ </defs>
+ <circle cx="100" cy="80" r="42" fill="url(#grad1)"/>
+</svg>
diff --git a/doc/examples/accelbubble/accelbubble.pro b/doc/examples/accelbubble/accelbubble.pro
new file mode 100644
index 0000000000..8dcac29df2
--- /dev/null
+++ b/doc/examples/accelbubble/accelbubble.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+
+QT += qml quick widgets
+
+SOURCES += main.cpp
+
+RESOURCES += qml.qrc
+
+# Additional import path used to resolve QML modules in Qt Creator's code model
+QML_IMPORT_PATH =
+
+# Default rules for deployment.
+include(deployment.pri)
+
diff --git a/doc/examples/accelbubble/main.qml b/doc/examples/accelbubble/main.qml
index 10d7aa9908..02cc2f653d 100644
--- a/doc/examples/accelbubble/main.qml
+++ b/doc/examples/accelbubble/main.qml
@@ -35,8 +35,8 @@
**
**************************************************************************/
-import QtQuick 2.2
-import QtQuick.Controls 1.1
+import QtQuick 2.5
+import QtQuick.Controls 1.4
import QtSensors 5.0
@@ -47,6 +47,20 @@ ApplicationWindow {
height: 480
visible: true
+ menuBar: MenuBar {
+ Menu {
+ title: qsTr("File")
+ MenuItem {
+ text: qsTr("&Open")
+ onTriggered: console.log("Open action triggered");
+ }
+ MenuItem {
+ text: qsTr("Exit")
+ onTriggered: Qt.quit();
+ }
+ }
+ }
+
Image {
id: bubble
source: "Bluebubble.svg"
@@ -105,18 +119,4 @@ ApplicationWindow {
function calcRoll(x, y, z) {
return -(Math.atan(x / Math.sqrt(y * y + z * z)) * 57.2957795);
}
-
- menuBar: MenuBar {
- Menu {
- title: qsTr("File")
- MenuItem {
- text: qsTr("&Open")
- onTriggered: console.log("Open action triggered");
- }
- MenuItem {
- text: qsTr("Exit")
- onTriggered: Qt.quit();
- }
- }
- }
}