|
KanoopGuiQt 1.3.0
Qt GUI utility library
|
|
QPushButton subclass with stylesheet-based color and font customization. More...
#include <pushbutton.h>
Inheritance diagram for PushButton:
Collaboration diagram for PushButton:Public Member Functions | |
| PushButton (QWidget *parent=nullptr) | |
| Construct a PushButton with an optional parent widget. | |
| PushButton (const QString &text, QWidget *parent=nullptr) | |
| Construct a PushButton with the given text and optional parent widget. | |
| PushButton (const QIcon &icon, const QString &text, QWidget *parent=nullptr) | |
| Construct a PushButton with the given icon, text, and optional parent widget. | |
| void | setFontPointSize (int size) |
| Set the font point size. | |
| void | setFontPixelSize (int size) |
| Set the font pixel size. | |
| void | setBold (bool bold) |
| Set the font bold state. | |
| void | setItalic (bool italic) |
| Set the font italic state. | |
| QColor | foregroundColor () const |
| Get the current foreground color. | |
| QColor | backgroundColor () const |
| Get the current background color. | |
| void | setBorderRadius (int radius) |
| Set the border radius in pixels. | |
| void | setHoverForegroundColor (const QColor &color) |
| Set the foreground color when the mouse hovers over the button. | |
| void | setHoverBackgroundColor (const QColor &color) |
| Set the background color when the mouse hovers over the button. | |
| void | setPressedForegroundColor (const QColor &color) |
| Set the foreground color when the button is pressed. | |
| void | setPressedBackgroundColor (const QColor &color) |
| Set the background color when the button is pressed. | |
| void | setDisabledForegroundColor (const QColor &color) |
| Set the foreground color when the button is disabled. | |
| void | setDisabledBackgroundColor (const QColor &color) |
| Set the background color when the button is disabled. | |
Properties | |
| QColor | foregroundColor |
| The current foreground (text) color of the button. | |
| QColor | backgroundColor |
| The current background color of the button. | |
QPushButton subclass with stylesheet-based color and font customization.
PushButton extends QPushButton to provide programmatic control over foreground, background, hover, pressed, and disabled state colors via Qt stylesheets. It also offers convenience methods for font size, weight, and style changes.
Definition at line 14 of file pushbutton.h.
|
inline |
Get the current background color.
Definition at line 43 of file pushbutton.h.
|
inline |
Get the current foreground color.
Definition at line 41 of file pushbutton.h.
|
readwrite |
The current background color of the button.
Definition at line 21 of file pushbutton.h.
|
readwrite |
The current foreground (text) color of the button.
Definition at line 19 of file pushbutton.h.