Thursday, 15 April 2010

qt - What is button property "tooltip" used for? -



qt - What is button property "tooltip" used for? -

i'm writing test application seek out qml has offer. have created simple button , tried create tooltip on mouse hover event. found several solutions how create happen (example) , not problem.

in documentation, however, have encountered button property called tooltip. assumed if built-in component has such property creation of tooltip automated. apparently not case, since defining tooltip property did not alter anything.

the question property used for?

button { id: mybutton x: 10 y: 10 text: "click me" tooltip: "some tooltip" }

showing of tooltip requires receiving of mouse hover events , possible if button not overlapped mousearea hoverenabled property equal true. next illustration shows tooltip fine on os x , qt 5.2.1:

import qtquick 2.0 import qtquick.controls 1.1 rectangle { width: 360 height: 360 text { anchors.centerin: parent text: "hello world" } button { id: mybutton x: 10 y: 10 text: "click me" tooltip: "some tooltip" } }

qt qml

No comments:

Post a Comment