Version: 0.0.1 A QPushButton with a hovered state and text
Contributors Fabio Goncalves
GitHub Page
Inheritance PySide6.QtWidgets.QPushButton
Attributes defaultText str hoveredText str hovered bool
Detailed Description HtButton is a handy little button that uses the enterEvent and the leaveEvent to set a property (hovered) based on if the button is hovered by the mouse.
I also allows for setting text for when the button is hovered.
from MadQt.Widgets import HtButton
button = HtButton ()
button . setDefaultText ( "Who's there?" )
button . setHoveredText ( "It's me, MARIO!" )
setHoveredText Sets the text to display when the button is hovered.
getHoveredText Returns text displayed when button is hovered.
setDefaultText Sets the text to display when the button is not hovered.
getDefaultText Returns text displayed when button is not hovered.
getHovered Returns True if button is hovered.