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.
pyqt5 Getting started with pyqt5 Showing a tooltip To create a tooltip, we call the setTooltip() method. We can use rich text formatting. We create a push button widget and set a tooltip for it. The button is being resized and moved on the window.
You can add a tooltip by calling . setToolTip("text") on a widget. This is often used to assist the user.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With