diff --git a/components/drawer.cpp b/components/drawer.cpp index a8bdf67..c3b50c2 100644 --- a/components/drawer.cpp +++ b/components/drawer.cpp @@ -1,4 +1,10 @@ #include "drawer.h" +#include "drawer_p.h" + +DrawerPrivate(Drawer *q) + : q_ptr(q) +{ +} Drawer::Drawer(QWidget *parent) : QWidget(parent) diff --git a/components/drawer.h b/components/drawer.h index addb8c7..2ac289d 100644 --- a/components/drawer.h +++ b/components/drawer.h @@ -11,9 +11,11 @@ public: explicit Drawer(QWidget *parent = 0); ~Drawer(); + Drawer *const q_ptr; + private: Q_DISABLE_COPY(Drawer) - //Q_DECLARE_PRIVATE(Drawer) + Q_DECLARE_PRIVATE(Drawer) }; #endif // DRAWER_H diff --git a/components/drawer_p.h b/components/drawer_p.h new file mode 100644 index 0000000..914bf15 --- /dev/null +++ b/components/drawer_p.h @@ -0,0 +1,17 @@ +#ifndef DRAWER_P_H +#define DRAWER_P_H + +#include + +class Drawer; + +class DrawerPrivate +{ + Q_DISABLE_COPY(DrawerPrivate) + Q_DECLARE_PUBLIC(Drawer) + +public: + DrawerPrivate(Drawer *q); +}; + +#endif // DRAWER_P_H diff --git a/qt-material-widgets.pro b/qt-material-widgets.pro index e25b732..e85a381 100644 --- a/qt-material-widgets.pro +++ b/qt-material-widgets.pro @@ -158,7 +158,8 @@ HEADERS += mainwindow.h \ components/dialog_internal.h \ lib/transparencyproxy.h \ lib/transparencyproxy_p.h \ - lib/transparencyproxy_internal.h + lib/transparencyproxy_internal.h \ + components/drawer_p.h RESOURCES += \ resources.qrc