Meshroom/meshroom/ui/qml/MaterialIcons/MLabel.qml
2023-07-03 12:11:29 +02:00

23 lines
539 B
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
/**
* MLabel is a standard Label.
* If ToolTip.text is set, it shows up a tooltip when hovered.
*/
Label {
padding: 4
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.NoButton
}
ToolTip.visible: mouseArea.containsMouse
ToolTip.delay: 500
background: Rectangle {
anchors.fill: parent
color: mouseArea.containsMouse ? Qt.darker(parent.palette.base, 0.6) : "transparent"
}
}