Solved how the functions of QanalogClockPlugin has been called in qwidgetplugins.
-
@hjohn The application is showing the widget, the plug-in simply creates and returns an instance of it.
-
When run Example of http://doc.qt.io/qt-5/qtdesigner-customwidgetplugin-example.html
it generate
It means that This project is not created in the normal 'Qt-executable' kind format.Maybe because there is no main.cpp file.
what should i add or how to create project so that is get output as a analogClock . -
@hjohn The main.cpp is part of QtDesigner.
So, it is a normal Qt application which loads plug-ins.
Again: a plug-in does NOT have a main.cpp, because it is a plug-in which is loaded by an application.
A plug-in is a library and a library does not have main.cpp. -
Hi
To see the clock there is 2 options.
1:
Compile it as plugin and COPY the DLL to the Designer plugin folder in your Qt installation folder
( or do make install )
Start Creator and then make project as normally with ui and
drag the analog clock to the new form.2:
Dont use as plugin at all.
use the files analogclock.cpp/.h directly in a project
and simply NEW a analog clock and show it.If you just started with Qt/programming. Designer plugins are maybe a bit
hard topic to start with :) -
@jsulm so how am I supposed to load this plugin?
http://doc.qt.io/qt-5/qtdesigner-customwidgetplugin-example.html -
-
This post is deleted! -
@mrjj said in how the functions of QanalogClockPlugin has been called in qwidgetplugins.:
Start Creator and then make project as normally with ui and
drag the analog clock to the new form.hey thanks.Can u elaborate this , It would be great help.
-
@hjohn
Well if on windows.
Check what your creator was compiled with.
You need to use same compiler and ca. same Qt version.
Install visual studio 2015 or 2017 with 32 bit !
This is a download from Microsoft site. Not Qt. ( not allowed)
( you cannot use mingw)
Install the Qt for visual studio.
(mingw version cannot be used)
THE ABOVE IS MUST DO! else it wont work.
Then compile the plugin in RELEASE mode and 32 Bit. ( not 64)
Go to its build folder and copy the DLL to
C:\Qt\Tools\QtCreator\bin\plugins\designer
Start Creator and go to design mode
It will be in list to the left.
Scroll down to find it.Note: this is considered intermediate level. :)
-
Thank you very much @mrjj
Now I got the clear idea what was the mistake I was making. And thanks a lot for the efforts you did, it was a huge help.Thank you.