Add properties to PaletteEditor and ColorButton

This commit is contained in:
Martchus 2022-03-08 00:37:47 +01:00
parent de3379d9b7
commit 6640d16557
3 changed files with 4 additions and 2 deletions

View File

@ -9,8 +9,8 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
set(META_APP_DESCRIPTION
"Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models")
set(META_VERSION_MAJOR 6)
set(META_VERSION_MINOR 5)
set(META_VERSION_PATCH 4)
set(META_VERSION_MINOR 6)
set(META_VERSION_PATCH 0)
set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH})
project(${META_PROJECT_NAME})

View File

@ -14,6 +14,7 @@ namespace QtUtilities {
*/
class QT_UTILITIES_EXPORT ColorButton : public QToolButton {
Q_OBJECT
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
Q_PROPERTY(bool backgroundCheckered READ isBackgroundCheckered WRITE setBackgroundCheckered)
public:
ColorButton(QWidget *parent = nullptr);

View File

@ -28,6 +28,7 @@ class PaletteEditor;
*/
class QT_UTILITIES_EXPORT PaletteEditor : public QDialog {
Q_OBJECT
Q_PROPERTY(QPalette palette READ palette WRITE setPalette)
public:
PaletteEditor(QWidget *parent);
~PaletteEditor() override;