User Tools

Site Tools


qt-quick-for-designers-1:components

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
qt-quick-for-designers-1:components [2013/06/22 04:03] mithatqt-quick-for-designers-1:components [2013/06/22 04:16] mithat
Line 48: Line 48:
  
 ===== Properties ===== ===== Properties =====
-  * You can declare a ''property'' do expose something inside Component to the outside:+  * You can declare a ''property'' do expose a component's internal propery to the outside:
 <file javascript ButtonSimple2.qml> <file javascript ButtonSimple2.qml>
 import QtQuick 1.0 import QtQuick 1.0
Line 66: Line 66:
         anchors.topMargin: 6         anchors.topMargin: 6
     }     }
 +
 +    MouseArea {
 +       anchors.fill: parent
 +       onClicked: {
 +           label.text = "Thanks!";
 +       }
 +   }
 }</file> }</file>
  
Line 82: Line 89:
         anchors.bottom: myItem.bottom         anchors.bottom: myItem.bottom
         anchors.bottomMargin: 20         anchors.bottomMargin: 20
-         
-        MouseArea { 
-            anchors.fill: parent 
-            onClicked: { 
-                parent.labelText = "Thanks!"; 
-            } 
-        } 
     }     }
 }</file> }</file>
-  * Note that the MouseArea has been moved out of ''ButtonSimple2.qml''.+ 
 +===== Signals ===== 
qt-quick-for-designers-1/components.txt · Last modified: 2013/07/06 22:53 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki