forked from qt-creator/qt-creator
QmlDesigner: Add a tooltip option to HelperWidgets.Section's caption
Change-Id: Ic266daa53d1daab4b7b38927eafe4cc939bb3ac2 Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
@@ -13,6 +13,7 @@ Item {
|
|||||||
readonly property bool __isSection: true // used by property search logic
|
readonly property bool __isSection: true // used by property search logic
|
||||||
|
|
||||||
property string caption: "Title"
|
property string caption: "Title"
|
||||||
|
property string captionTooltip: ""
|
||||||
property color labelColor: StudioTheme.Values.themeTextColor
|
property color labelColor: StudioTheme.Values.themeTextColor
|
||||||
property int labelCapitalization: Font.AllUppercase
|
property int labelCapitalization: Font.AllUppercase
|
||||||
property alias sectionHeight: header.height
|
property alias sectionHeight: header.height
|
||||||
@@ -40,6 +41,20 @@ Item {
|
|||||||
font.capitalization: section.labelCapitalization
|
font.capitalization: section.labelCapitalization
|
||||||
anchors.verticalCenter: parent?.verticalCenter
|
anchors.verticalCenter: parent?.verticalCenter
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: labelMouseArea
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.NoButton
|
||||||
|
hoverEnabled: true
|
||||||
|
enabled: section.captionTooltip !== ""
|
||||||
|
}
|
||||||
|
|
||||||
|
StudioControls.ToolTip {
|
||||||
|
visible: labelMouseArea.containsMouse
|
||||||
|
text: section.captionTooltip
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property Item icons
|
property Item icons
|
||||||
|
Reference in New Issue
Block a user