how the functions of QanalogClockPlugin has been called in qwidgetplugins.
-
@hjohn
Hi
You can show a widget from anywhere.
But to prevent out of scope issues, you should new itWidget* w = new Widget(this);
w->show();But normally, a plugin for Designer DO NOT open other widgets.
@mrjj said in how the functions of QanalogClockPlugin has been called in qwidgetplugins.:
But normally, a plugin for Designer DO NOT open other widgets.
In example there is only one widget.which is analogclock and that i want to open. In example there is no any w.show();command
-
@mrjj said in how the functions of QanalogClockPlugin has been called in qwidgetplugins.:
But normally, a plugin for Designer DO NOT open other widgets.
In example there is only one widget.which is analogclock and that i want to open. In example there is no any w.show();command
-
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 . -
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 :) -
@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. -
@jsulm so how am I supposed to load this plugin?
http://doc.qt.io/qt-5/qtdesigner-customwidgetplugin-example.html -
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 :) -
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 :)@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.
-
@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. :)
-
@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. :)