Image 01
profile-image

Badam

Benjamin ADAM
QSwitch

Qt Widgets by qphoton 7 comments

Hello community.
Even if this very very usefull plugin haven't been updated since a while, I'll post here the method to make it compatible with Qt5 (I made it with Qt 5.4.2). It takes me quite long time to make it running, so if it can be useful for someone...


In qswitchplugin.pro, change CONFIG line by :
QT += widgets designer
CONFIG += plugin release

In qswitchplugin.h, between Q_OBJECT and Q_INTERFACES, add :
Q_PLUGIN_METADATA(IID "org.qt.QDesignerCustomWidgetInterface")

In qswitchplugin.cpp, before #include <QtPlugin>, add :
#include <QtDesigner>
AND comment the last line :
Q_EXPORT_PLUGIN2(customwidgetplugin, QSwitchPlugin)

In qswitch.h, remove ';' add the end of each Q_PROPERTY line. - Oct 07 2015
QLed

Qt Widgets
by qphoton

6.1
9   Oct 08 2015
QSwitch

Qt Widgets
by qphoton

6.5
9   Oct 07 2015