Change press to hover.

This commit is contained in:
Black Hat 2018-07-09 22:50:22 +08:00
parent 32cad0d651
commit 236f8ce48b
2 changed files with 7 additions and 8 deletions

View File

@ -18,6 +18,7 @@ Item {
} }
MouseArea { MouseArea {
id: baseMouseArea
anchors.fill: parent anchors.fill: parent
ToolTip.visible: pressed ToolTip.visible: pressed
@ -42,12 +43,10 @@ Item {
displayText: author.displayName displayText: author.displayName
MouseArea { MouseArea {
id: mouseArea
anchors.fill: parent anchors.fill: parent
ToolTip.visible: pressed hoverEnabled: true
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval ToolTip.visible: containsMouse
ToolTip.text: author.displayName ToolTip.text: author.displayName
} }
} }
@ -103,8 +102,9 @@ Item {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
ToolTip.visible: pressed hoverEnabled: true
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval propagateComposedEvents: true
ToolTip.visible: containsMouse
ToolTip.text: visible ? content.body : "" ToolTip.text: visible ? content.body : ""
} }
} }

View File

@ -27,8 +27,7 @@ Item {
height: 80 height: 80
onClicked: listView.currentIndex = index onClicked: listView.currentIndex = index
ToolTip.visible: pressed ToolTip.visible: mini && hovered
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
ToolTip.text: name ToolTip.text: name
contentItem: RowLayout { contentItem: RowLayout {