summaryrefslogtreecommitdiff
path: root/src/tutorials/Tooltip.qml
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-03-09 12:34:34 +0100
committerTannin <devnull@localhost>2015-03-09 12:34:34 +0100
commit7a1ae9b0f1560c9eda32e032796fbb3fd56ff236 (patch)
treedea71435ac1042cb008fcd9f7b1ec57e6ea91227 /src/tutorials/Tooltip.qml
parentd45ebf134819e1559718681becca9c4139fb7151 (diff)
parentdb2954e8eb41da715b9e7d79a72e225797401413 (diff)
Merge with branch1.2
Diffstat (limited to 'src/tutorials/Tooltip.qml')
-rw-r--r--src/tutorials/Tooltip.qml31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/tutorials/Tooltip.qml b/src/tutorials/Tooltip.qml
new file mode 100644
index 00000000..6424d9ab
--- /dev/null
+++ b/src/tutorials/Tooltip.qml
@@ -0,0 +1,31 @@
+import QtQuick 1.1
+
+
+Rectangle {
+ color: "#EE888888"
+ width: childrenRect.width + 15
+ height: childrenRect.height + 15
+ z: 20000
+ clip: false
+ border.color: "black"
+ border.width: 1
+ property alias text: tooltipText.text
+ Text {
+ id: tooltipText
+ font.pointSize: 11
+ wrapMode: Text.WordWrap
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.leftMargin: 7
+ anchors.rightMargin: 7
+ z: parent.z
+ color: "black"
+ onTextChanged: {
+ if (width > 200)
+ width = 200
+ }
+ }
+ visible: false
+}
+
+