Thanks you very much, it work very well. let's hope this Private API make it public some day with possible style customization. I can now remove the ugly z ordering of many component now, make the scripts way more clean.
regards, Jerome On Thu, Oct 8, 2015 at 7:31 AM, Nicolas Kniebihler < nicolas.kniebih...@dualo.org> wrote: > Hi Jerome, > > I don't know if that answers your question, but I personally use the way > QML shows tooltips above Buttons: > > MyTooltip.qml: > > import QtQuick 2.3 > > import QtQuick.Controls 1.2 > > import QtQuick.Controls.Private 1.0 > > MouseArea { > > id: behavior > > property string tooltip > > hoverEnabled: true > > propagateComposedEvents: true > > onExited: Tooltip.hideText() > > onCanceled: Tooltip.hideText() > > Timer { > > interval: 1000 > > running: behavior.containsMouse && !behavior.pressed && tooltip.length > > onTriggered: Tooltip.showText(behavior, Qt.point(behavior.mouseX, > behavior.mouseY), tooltip) > > } > > } > > > Example: > > Label { > > text: "My label" > > MyTooltip { > > anchors.fill: parent > > tooltip: qsTr("My tooltip") > > } > > } > > > This way I can show a tooltip above any component (not just Buttons). > > Nicolas > > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest