53a98ecbe5
This checkbox gives an 'eye' icon that indicates whether something is visible or not. The color of the icon is influenced by the current style's foreground color.
18 lines
261 B
C++
18 lines
261 B
C++
#include <QCheckBox>
|
|
#include <QPixmap>
|
|
|
|
class QPaintEvernt;
|
|
|
|
class VisibilityCheckBox : public QCheckBox {
|
|
Q_OBJECT
|
|
|
|
QPixmap checkedImage;
|
|
QPixmap uncheckedImage;
|
|
|
|
public:
|
|
VisibilityCheckBox();
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *event) override;
|
|
};
|