Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
q/kdb+ 1.27 KB | None | 0 0
  1. import QtQuick 2.0
  2. import Ubuntu.Components 0.1
  3.  
  4.  
  5. MainView {
  6.     objectName: "test"
  7.     applicationName: "test2"
  8.  
  9.     id: root
  10.  
  11.     width: units.gu(60)
  12.     height: units.gu(80)
  13.  
  14.     property real margins: units.gu(2)
  15.     property real buttonWidth: units.gu(10)
  16.  
  17.     Button {
  18.             text: "Send"
  19.             onClicked: testLabel.text = "clicked text-only Button"
  20.         anchors {
  21.             top: parent.top
  22.             left: parent.left
  23.  
  24.             topMargin: units.gu(15)
  25.             leftMargin: units.gu(15)
  26.         }
  27.     }
  28.  
  29.     Item {
  30.         Slider {
  31.             function formatValue(v) { return v.toFixed(2) }
  32.             minimumValue: -3.14
  33.             maximumValue: 3.14
  34.             value: 0.0
  35.             live: true
  36.  
  37.             anchors {
  38.                 top: parent.top
  39.                 left: parent.left
  40.  
  41.                 topMargin: units.gu(5)
  42.                 leftMargin: root.margins
  43.             }
  44.         }
  45.     }
  46.  
  47.     Item {
  48.         Switch {
  49.             checked: true
  50.         }
  51.     }
  52.  
  53.     Label {
  54.         id: testLabel
  55.  
  56.         text: "test"
  57.  
  58.         anchors {
  59.             top: parent.top
  60.             left: parent.left
  61.  
  62.             topMargin: units.gu(30)
  63.             leftMargin: root.margins*2
  64.         }
  65.     }
  66.  
  67.  
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement