PDA

View Full Version : How to compile a plugin for custom widget?



panoss
2nd February 2017, 11:33
Hi everybody.
I 'm trying to follow this tutorial (http://doc.qt.io/qt-5/qtdesigner-customwidgetplugin-example.html) for creating a custom widget (which, from what I understand, is wrapped by a pugin for the Qt Designer to be able to 'see' it).
My files are at:
C:\Documents\QtProjects\mycustomwidget:
--customwidgetplugin.pro
--analogclock.h
--analogclock.cpp
--customwidgetplugin.h
--customwidgetplugin.cpp

I open a console:
cd C:\Documents\QtProjects\mycustomwidget
qmake

And so a file named MakeFile is created. It has, at the top: Command: C:\Qt\5.8\mingw53_32\bin\qmake.exe -o Makefile customwidgetplugin.pro
I give this command in console, seems like it's doing something, and shows the message: Info: creating stash file C:\Documents\QtProjects\mycustomwidget.qmake.stash

I open Qt Designer and no new widget is added in it...:(

Isn't the procedure I follow the correct one?

anda_skoa
3rd February 2017, 07:55
After running qmake you have to run make.

qmake generates the build files, in this case a Makefile, another tool, in this case make, processes that to actually build the software.

Cheers,
_