examples/declarative/toys/dynamicscene/dynamicscene.qml
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 37 758a864f9613
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    48     property int activeSuns: 0
    48     property int activeSuns: 0
    49 
    49 
    50     //This is a desktop-sized example
    50     //This is a desktop-sized example
    51     width: 800; height: 480
    51     width: 800; height: 480
    52 
    52 
    53     
    53 
       
    54     MouseArea {
       
    55         anchors.fill: parent
       
    56         onClicked: window.focus = false;
       
    57     }
       
    58 
    54     //This is the message box that pops up when there's an error
    59     //This is the message box that pops up when there's an error
    55     Rectangle {
    60     Rectangle {
    56         id: dialog
    61         id: dialog
    57 
    62 
    58         opacity: 0
    63         opacity: 0
   177 
   182 
   178                 TextEdit {
   183                 TextEdit {
   179                     id: qmlText
   184                     id: qmlText
   180                     anchors.fill: parent; anchors.margins: 5
   185                     anchors.fill: parent; anchors.margins: 5
   181                     readOnly: false
   186                     readOnly: false
   182                     focusOnPress: true
       
   183                     font.pixelSize: 14
   187                     font.pixelSize: 14
   184                     wrapMode: TextEdit.WordWrap
   188                     wrapMode: TextEdit.WordWrap
   185 
   189 
   186                     text: "import Qt 4.7\nImage {\n    id: smile\n    x: 360 * Math.random()\n    y: 180 * Math.random() \n    source: 'images/face-smile.png'\n    NumberAnimation on opacity { \n        to: 0; duration: 1500\n    }\n    Component.onCompleted: smile.destroy(1500);\n}"
   190                     text: "import Qt 4.7\nImage {\n    id: smile\n    x: 360 * Math.random()\n    y: 180 * Math.random() \n    source: 'images/face-smile.png'\n    NumberAnimation on opacity { \n        to: 0; duration: 1500\n    }\n    Component.onCompleted: smile.destroy(1500);\n}"
   187                 }
   191                 }