diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-25 04:17:22 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-25 04:17:22 (GMT) |
commit | 271904ca7806abfe3c4a9004831658803e18737c (patch) | |
tree | 8dbdd7fbd85b388c4bcf0619ed73e53e720415e6 /demos/declarative/samegame | |
parent | 61aee31f6fdae0579efe28998ac07f8af5f733d5 (diff) | |
download | Qt-271904ca7806abfe3c4a9004831658803e18737c.zip Qt-271904ca7806abfe3c4a9004831658803e18737c.tar.gz Qt-271904ca7806abfe3c4a9004831658803e18737c.tar.bz2 |
Dialog width is dependent on text
Diffstat (limited to 'demos/declarative/samegame')
-rw-r--r-- | demos/declarative/samegame/content/Dialog.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/demos/declarative/samegame/content/Dialog.qml b/demos/declarative/samegame/content/Dialog.qml index a3c5f33..72c7900 100644 --- a/demos/declarative/samegame/content/Dialog.qml +++ b/demos/declarative/samegame/content/Dialog.qml @@ -2,7 +2,7 @@ import Qt 4.6 Rectangle { id: page - color: "white"; border.width: 1; width: 200; height: 60; + color: "white"; border.width: 1; width: MyText.width + 20; height: 60; property string text: "Hello World!" opacity: 0 opacity: Behavior { @@ -11,5 +11,5 @@ Rectangle { NumberAnimation {property: "opacity"; to: 0; duration: 1500 } } } - Text { anchors.centerIn: parent; text: parent.text } + Text { id: MyText; anchors.centerIn: parent; text: parent.text } } |