Warning, /plasma/libplasma/tests/dialog_tooltip.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2014 Vishesh Handa <vhanda@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 import QtQuick
0008 
0009 import QtQuick.Controls as Controls
0010 import QtQuick.Layouts
0011 
0012 import org.kde.plasma.core as PlasmaCore
0013 
0014 ColumnLayout {
0015     Controls.Label {
0016         Layout.maximumWidth: mainLayout.width
0017         wrapMode: Text.WordWrap
0018         text: "Hover over every rectangle so that the tooltip pops up. It should popup in the correct position"
0019     }
0020 
0021     RowLayout {
0022         id: mainLayout
0023         Rectangle {
0024             width: 300
0025             height: 100
0026             color: "red"
0027 
0028             PlasmaCore.ToolTipArea {
0029                 width: 300
0030                 height: 50
0031 
0032                 mainText: "Title Number 1"
0033                 subText: "subtext"
0034                 icon: "plasma"
0035             }
0036         }
0037 
0038         Rectangle {
0039             width: 300
0040             height: 100
0041             color: "blue"
0042 
0043             PlasmaCore.ToolTipArea {
0044                 width: 500
0045                 height: 110
0046 
0047                 mainText: "Title Number 2"
0048                 subText: "This is some really really really long subtext. So lets write stores about the woods and the trees and how we're going hiking. Yaye!"
0049                 icon: "configure"
0050             }
0051         }
0052 
0053         Rectangle {
0054             width: 300
0055             height: 100
0056             color: "green"
0057 
0058             PlasmaCore.ToolTipArea {
0059                 width: 350
0060                 height: 70
0061 
0062                 mainText: "Wakka Wakka"
0063                 subText: "It's time for Africa"
0064             }
0065         }
0066     }
0067 }