I want to use PyQt to create a small info window (not a new QDialog or QWidget) with text only associated with each button in my program. When the user places the mouse cursor across the button (no click) this info text should be displayed. Similarly, when the cursor is removed from the button the info text is displayed no more. The idea is to simply inform the user what different buttons do when they get pressed. How is this done in PyQt?
Use QWidget.setToolTip()
.
Example:
button = QPushButton("Button", parent)
button.setToolTip("Text in the info window")
Here the documentation (C++ only)