summaryrefslogtreecommitdiffstats
path: root/examples/declarative/plugins/plugins.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/plugins/plugins.qml')
-rw-r--r--examples/declarative/plugins/plugins.qml22
1 files changed, 5 insertions, 17 deletions
diff --git a/examples/declarative/plugins/plugins.qml b/examples/declarative/plugins/plugins.qml
index df6b5d4..97c1b69 100644
--- a/examples/declarative/plugins/plugins.qml
+++ b/examples/declarative/plugins/plugins.qml
@@ -1,23 +1,11 @@
-import Qt 4.6
import com.nokia.TimeExample 1.0
-Item {
+Clock { // this class is defined in QML (files/Clock.qml)
- Time { id: time }
-
- width: 200
- height: 100
-
- Rectangle {
- anchors.fill: parent
- color: "blue"
+ Time { // this class is defined in C++ (plugins.cpp)
+ id: time
}
- Text {
- text: time.hour + ":" + (time.minute < 10 ? "0" : "") + time.minute
- anchors.centerIn: parent
- color: "white"
- font.pixelSize: 42
- font.bold: true
- }
+ hours: time.hour
+ minutes: time.minute
}