qt-quick-for-designers-1:components
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
qt-quick-for-designers-1:components [2013/06/22 04:24] – [Signals] mithat | qt-quick-for-designers-1:components [2013/07/06 22:53] (current) – [Resources] mithat | ||
---|---|---|---|
Line 48: | Line 48: | ||
===== Properties ===== | ===== Properties ===== | ||
- | * You can declare a '' | + | * You can declare a '' |
<file javascript ButtonSimple2.qml> | <file javascript ButtonSimple2.qml> | ||
import QtQuick 1.0 | import QtQuick 1.0 | ||
Line 93: | Line 93: | ||
===== Signals ===== | ===== Signals ===== | ||
- | * A '' | + | * A '' |
- | * In the Button below, '' | + | * In the Button below, '' |
<file javascript Button.qml> | <file javascript Button.qml> | ||
import QtQuick 1.0 | import QtQuick 1.0 | ||
Line 121: | Line 121: | ||
} | } | ||
}</ | }</ | ||
- | * The actual behavior is defined in the file where Button is used (as the Button' | + | * The actual behavior is defined in the file where Button is used (as '' |
<file javascript resuing-button.qml> | <file javascript resuing-button.qml> | ||
import QtQuick 1.0 | import QtQuick 1.0 | ||
- | import " | ||
- | |||
Item { | Item { | ||
id: myItem | id: myItem | ||
width: 400 | width: 400 | ||
height: 400 | height: 400 | ||
- | |||
- | property int actualStateNumber: | ||
- | |||
- | Image { | ||
- | source: " | ||
- | } | ||
- | |||
- | Image { | ||
- | id: spaceship | ||
- | x: -200 | ||
- | y: 50 | ||
- | source: " | ||
- | } | ||
Button { | Button { | ||
Line 153: | Line 138: | ||
onButtonClicked: | onButtonClicked: | ||
- | | + | |
} | } | ||
} | } | ||
- | |||
- | | ||
- | State { | ||
- | name: " | ||
- | | ||
- | | ||
- | x: 250 | ||
- | y: 200 | ||
- | } | ||
- | }, | ||
- | State { | ||
- | name: " | ||
- | | ||
- | | ||
- | x: 100 | ||
- | y: 200 | ||
- | } | ||
- | }, | ||
- | State { | ||
- | name: " | ||
- | | ||
- | | ||
- | x: 10 | ||
- | y: 50 | ||
- | } | ||
- | }, | ||
- | State { | ||
- | name: " | ||
- | | ||
- | | ||
- | x: 100 | ||
- | y: 50 | ||
- | } | ||
- | } | ||
- | ] | ||
- | |||
- | transitions: | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | } | ||
- | }, | ||
- | | ||
- | from: "" | ||
- | to: " | ||
- | | ||
- | PauseAnimation { | ||
- | | ||
- | } | ||
- | |||
- | NumberAnimation { | ||
- | properties: " | ||
- | duration: 500 | ||
- | easing.type: | ||
- | } | ||
- | } | ||
- | } | ||
- | ] | ||
- | |||
- | Component.onCompleted: | ||
- | myItem.state = " | ||
- | } | ||
- | |||
} | } | ||
</ | </ | ||
+ | -------------------------------------------------------------- | ||
+ | ====== Resources ====== | ||
+ | * {{: | ||
+ | * All source code is subject to this [[copyright header|copyright]]. |
qt-quick-for-designers-1/components.1371875088.txt.gz · Last modified: 2013/06/22 04:24 by mithat