diff --git a/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp b/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp index 7e644493b06e837907c7d08bbfade591b0221d9b..0a60a8bbf9292696cfda2c26001a127dd262cf32 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp @@ -106,6 +106,7 @@ class QWidgetDeclarativeUI : public QObject Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor) Q_PROPERTY(QColor windowTextColor READ windowTextColor WRITE setWindowTextColor) Q_PROPERTY(QColor buttonTextColor READ buttonTextColor WRITE setButtonTextColor) + Q_PROPERTY(QColor buttonColor READ buttonColor WRITE setButtonColor) Q_PROPERTY(int fixedWidth READ width WRITE setFixedWidth) Q_PROPERTY(int fixedHeight READ height WRITE setFixedHeight) @@ -359,6 +360,17 @@ public: q->setPalette(pal); } + QColor buttonColor() const + { return q->palette().color(QPalette::Button); } + + void setButtonColor(const QColor &color) + { + QPalette pal = q->palette(); + pal.setColor(QPalette::Button, color); + q->setPalette(pal); + } + + void setStyleSheetFile(const QUrl &url) { _styleSheetFile = url; _styleSheetFile.setScheme("file"); //### todo