aboutsummaryrefslogtreecommitdiffstats
diff options
authorMahmoud Badri <mahmoud.badri@qt.io>2025-04-11 01:26:48 +0300
committerMahmoud Badri <mahmoud.badri@qt.io>2025-04-11 09:36:05 +0000
commit13092d905c41a2bdeb43bf28ae9490c9788f8beb (patch)
tree1bd0dbfba824cd7e0ae62f8ecfe0482a52abd0f1
parent7c11cd1a1eac5e6016aa04ed2bb617a3d172758b (diff)
QmlDesigner: Add a tooltip option to HelperWidgets.Section's caption
Change-Id: Ic266daa53d1daab4b7b38927eafe4cc939bb3ac2 Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml
index 0f192f8875f..4cc0c747f73 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Section.qml
@@ -13,6 +13,7 @@ Item {
readonly property bool __isSection: true // used by property search logic
property string caption: "Title"
+ property string captionTooltip: ""
property color labelColor: StudioTheme.Values.themeTextColor
property int labelCapitalization: Font.AllUppercase
property alias sectionHeight: header.height
@@ -40,6 +41,20 @@ Item {
font.capitalization: section.labelCapitalization
anchors.verticalCenter: parent?.verticalCenter
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
close