Tooltip for QPushButton
Asked Answered
J

1

21

Is there a possibility to add a tooltip to a QPushButton. I mean, that when you roll over the button a small textbox appears (usually yellow) and tells users what this button is doing.

Thank you.

Jacquerie answered 6/11, 2011 at 19:47 Comment(0)
W
37

QPushButton is a QWidget, so it has the setToolTip(const QString&) like all other widgets.

Either that's what you're looking for, or you're after the setWhatsThis(const QString&) function. More info in the QWhatsThis documentation.

Winthorpe answered 6/11, 2011 at 19:50 Comment(2)
I just came across this and noticed that the links are broken. Take this and thatCompatriot
Thanks for the heads up @Theolodis, fixed!Winthorpe

© 2022 - 2024 — McMap. All rights reserved.