diff options
author | RJ Ryan <rryan@mixxx.org> | 2013-12-29 04:30:06 -0500 |
---|---|---|
committer | RJ Ryan <rryan@mixxx.org> | 2013-12-29 04:30:06 -0500 |
commit | c3ee084b883d51407b293314e0ff808196e401ed (patch) | |
tree | 389cad8ade02473e4eed1319b8c6db584dca5582 /src/widget/wdisplay.cpp | |
parent | b82ba1c14795143749ce909f6e484eb13f18c117 (diff) |
Allow WStatusLight, WDisplay and WKnob to be styled with a style sheet.
Diffstat (limited to 'src/widget/wdisplay.cpp')
-rw-r--r-- | src/widget/wdisplay.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/widget/wdisplay.cpp b/src/widget/wdisplay.cpp index ec8906fa44..eea6ac9174 100644 --- a/src/widget/wdisplay.cpp +++ b/src/widget/wdisplay.cpp @@ -17,7 +17,8 @@ #include "widget/wdisplay.h" -#include <QPainter> +#include <QStylePainter> +#include <QStyleOption> #include <QPaintEvent> #include <QtDebug> #include <QPixmap> @@ -112,7 +113,10 @@ int WDisplay::getActivePixmapIndex() const { } void WDisplay::paintEvent(QPaintEvent* ) { - QPainter p(this); + QStyleOption option; + option.initFrom(this); + QStylePainter p(this); + p.drawPrimitive(QStyle::PE_Widget, option); if (m_pPixmapBack) { p.drawPixmap(0, 0, *m_pPixmapBack); |