Hi,
I've created a set of custom widgets with plugins. My project file looks like so:
CONFIG += designer \
plugin \
release
TEMPLATE = lib
TARGET = PCustomWidgetGroup
HEADERS += pframe.h \
punitspinbox.h \
punitslider.h \
pcustomwidgetgroupplugin.h \
punitwidget.h
SOURCES += pframe.cpp \
punitspinbox.cpp \
punitslider.cpp \
punitwidget.cpp
FORMS += pframe.ui \
punitspinbox.ui \
punitslider.ui
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
CONFIG += designer \
plugin \
release
TEMPLATE = lib
TARGET = PCustomWidgetGroup
HEADERS += pframe.h \
punitspinbox.h \
punitslider.h \
pcustomwidgetgroupplugin.h \
punitwidget.h
SOURCES += pframe.cpp \
punitspinbox.cpp \
punitslider.cpp \
punitwidget.cpp
FORMS += pframe.ui \
punitspinbox.ui \
punitslider.ui
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
To copy to clipboard, switch view to plain text mode
Despite the fact that I have the INSTALLS line, the *.a and *.dll files don't actually get copied to that folder. Up to now I've been manually copying them myself, although I would like to know why this occurs (but this is only a small problem atm...).
Now, when I load QT Designer, all my custom widgets show up and work fine. Unfortunately, this isn't the case in any project I create in QT Creator. It has problems finding the header files at compile time. Of course, this makes sense to me, since it doesn't seem like the headers are being copied to any folder.
I added the following line to my project file above, as per a tutorial online...
INCLUDEPATH += $$QT_SOURCE_TREE/tools/designer/interfaces
INCLUDEPATH += $$QT_SOURCE_TREE/tools/designer/interfaces
To copy to clipboard, switch view to plain text mode
But alas, still no luck. I also added the following to my current project's .pro file:
LIBS += PCustomWidgetGroup
LIBS += PCustomWidgetGroup
To copy to clipboard, switch view to plain text mode
And nothing. I can't seem to find anything which adequately explains what folder my headers should be placed in, or how to do it automatically via the makefile. And, again, I'm unable to get the .a and .dll files copied without doing so manually.
Perhaps there's just something I'm doing entirely wrong and someone could snap me out of it All help is greatly appreciated! Thanks!
Bookmarks