Static helpers for generating common Qt stylesheet fragments.
More...
#include <stylesheets.h>
|
| static QString | backgroundColor (const QColor &color) |
| | Build a background-color stylesheet fragment.
|
| |
| static QString | foregroundColor (const QColor &color) |
| | Build a color (foreground) stylesheet fragment.
|
| |
| static QString | borderRadius (int radius) |
| | Build a border-radius stylesheet fragment.
|
| |
Static helpers for generating common Qt stylesheet fragments.
Each method returns a stylesheet snippet string that can be concatenated or passed directly to QWidget::setStyleSheet().
Definition at line 24 of file stylesheets.h.
◆ backgroundColor()
| static QString StyleSheets::backgroundColor |
( |
const QColor & |
color | ) |
|
|
static |
Build a background-color stylesheet fragment.
- Parameters
-
- Returns
- Stylesheet string, e.g. "background-color: #rrggbb;"
◆ borderRadius()
| static QString StyleSheets::borderRadius |
( |
int |
radius | ) |
|
|
static |
Build a border-radius stylesheet fragment.
- Parameters
-
| radius | Border radius in pixels |
- Returns
- Stylesheet string, e.g. "border-radius: 4px;"
◆ foregroundColor()
| static QString StyleSheets::foregroundColor |
( |
const QColor & |
color | ) |
|
|
static |
Build a color (foreground) stylesheet fragment.
- Parameters
-
- Returns
- Stylesheet string, e.g. "color: #rrggbb;"
The documentation for this class was generated from the following file: