diff -r 4a82990affd5 -r a24da8de2a3b widgets/colorbutton.h --- a/widgets/colorbutton.h Sat Apr 08 12:55:11 2023 +0300 +++ b/widgets/colorbutton.h Sat Apr 08 15:03:54 2023 +0300 @@ -1,18 +1,20 @@ #pragma once #include +#include /** * @brief A button that can be used to select a color */ -class ColorButton : public QPushButton +class ColorButton : public QWidget { Q_OBJECT Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) - QColor storedSelectedColor; + QLineEdit* lineEdit; + QPushButton* button; public: ColorButton(const QColor& color = {}, QWidget* parent = nullptr); ColorButton(QWidget* parent = nullptr); - const QColor& color() const; + QColor color() const; Q_SLOT void setColor(const QColor& color); Q_SIGNAL void colorChanged(const QColor& color); };