~ubuntu-branches/ubuntu/vivid/qtcreator-plugin-ubuntu/vivid

« back to all changes in this revision

Viewing changes to share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/Main.qml

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Benjamin Zeller
  • Date: 2015-02-09 12:39:40 UTC
  • mfrom: (1.1.87)
  • Revision ID: package-import@ubuntu.com-20150209123940-v34y8crkv29c18u1
Tags: 3.1.1+15.04.20150209-0ubuntu1
[ Benjamin Zeller ]
Make use of the backend in the qmake+backend app template. Fix
passing of the "CLICK_NO_LOCAL_MIRROR" env var to the chroot
creation script .

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import QtQuick 2.0
2
2
import Ubuntu.Components 1.1
3
 
 
 
3
import %ClickHookName:s% 1.0
4
4
/*!
5
5
    \brief MainView with a Label and Button elements.
6
6
*/
25
25
    height: units.gu(75)
26
26
 
27
27
    Page {
28
 
        title: i18n.tr("Simple")
 
28
        title: i18n.tr("App with backend")
 
29
 
 
30
        MyType {
 
31
            id: myType
 
32
 
 
33
            Component.onCompleted: {
 
34
                myType.helloWorld = i18n.tr("Hello world..")
 
35
            }
 
36
        }
29
37
 
30
38
        Column {
31
39
            spacing: units.gu(1)
38
46
                id: label
39
47
                objectName: "label"
40
48
 
41
 
                text: i18n.tr("Hello..")
 
49
                text: myType.helloWorld
42
50
            }
43
51
 
44
52
            Button {
48
56
                text: i18n.tr("Tap me!")
49
57
 
50
58
                onClicked: {
51
 
                    label.text = i18n.tr("..world!")
 
59
                    myType.helloWorld = i18n.tr("..from Cpp Backend")
52
60
                }
53
61
            }
54
62
        }