diff --git a/lib/style.cpp b/lib/style.cpp index fed60ea..39649bb 100644 --- a/lib/style.cpp +++ b/lib/style.cpp @@ -1 +1,16 @@ +#include +#include #include "style.h" + +void Style::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w = 0) const +{ + switch (pe) + { + case PE_FrameFocusRect: + //p->setPen(Qt::blue); + //p->drawRect(opt->rect); + break; + default: + QCommonStyle::drawPrimitive(pe, opt, p, w); + } +} diff --git a/lib/style.h b/lib/style.h index 9e0071f..702d82c 100644 --- a/lib/style.h +++ b/lib/style.h @@ -14,6 +14,9 @@ public: return instance; } + void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, + const QWidget *w = 0) const Q_DECL_OVERRIDE; + private: Style() {} diff --git a/qt-material-widgets.pro b/qt-material-widgets.pro index b5e7ca3..f3ef34b 100644 --- a/qt-material-widgets.pro +++ b/qt-material-widgets.pro @@ -50,7 +50,8 @@ SOURCES += main.cpp\ components/menu.cpp \ components/scrollbar.cpp \ examples/iconmenuexamples.cpp \ - lib/scaleeffect.cpp + lib/scaleeffect.cpp \ + lib/style.cpp HEADERS += mainwindow.h \ style.h \