Making a Qt custom widget without Qt Creator
-
wrote on 2 Feb 2017, 15:19 last edited by
On XP I haven't tried Qt Creator yet.
I was thinking of trying an older version, and adjusting the code where necessary. -
On XP I haven't tried Qt Creator yet.
I was thinking of trying an older version, and adjusting the code where necessary.@Panoss
well if u go back to Qt4 then all plugin stuff is a bit different. ( from Qt5 series)
So would be great if 5.6 can be used. :) -
wrote on 3 Feb 2017, 07:17 last edited by
Ok, I installed VS 2015 and the debugger (Windows 10 SDK).
Qt Creator auto-detected the VS compiler and a CDB debugger (this must be from Windows 10 SDK).
This means I 'm ready?
So how do I compile a plugin to dll? -
Start a "Qt Custom Designer Plugin" project and it will be all prepared for that. This one is under "Other project" in the "New File or Project" dialog.
-
wrote on 3 Feb 2017, 10:38 last edited by Panoss 2 Mar 2017, 10:59
-
wrote on 3 Feb 2017, 11:12 last edited by Panoss 2 Mar 2017, 11:18
-
wrote on 3 Feb 2017, 11:46 last edited by Panoss 2 Mar 2017, 11:47
Ok, after adding msvc2015 32-bit in Maintenance tool, everything seems ok.
I built the poject, and a dll was created(!!wow) in my project 's debug folder.I also now have two folders:
c:\qt\5.8\mingw53_32\bin and
c:\qt\5.8\msvc2015\bin
which have a designer.exe inside.
I run them both (I suppose the one that should show my plugin is the msvc2015\bind\designer.exe) but in none of them appears my plugin.
Also the dll of my plugin was not copied in any of the folders of c:\qt\5.8. -
Ok, after adding msvc2015 32-bit in Maintenance tool, everything seems ok.
I built the poject, and a dll was created(!!wow) in my project 's debug folder.I also now have two folders:
c:\qt\5.8\mingw53_32\bin and
c:\qt\5.8\msvc2015\bin
which have a designer.exe inside.
I run them both (I suppose the one that should show my plugin is the msvc2015\bind\designer.exe) but in none of them appears my plugin.
Also the dll of my plugin was not copied in any of the folders of c:\qt\5.8.@Panoss Try to copy the manually to plugins/designer directory in your msvc2015 Qt installation.
-
wrote on 3 Feb 2017, 11:59 last edited by Panoss 2 Mar 2017, 12:01
-
I copied it in C:\Qt\5.8\msvc2015\plugins\designer, but it failed: 'uses incompatible Qt library. Cannot mix debug and release libraries':
@Panoss
Try to build it in Release mode and then copy. -
wrote on 3 Feb 2017, 12:27 last edited by Panoss 2 Mar 2017, 12:29
In the Qt Creator 's 'Release' button, I chose 'release', and build.
In folder C:\Documents\QtProjects\AnalogClockB\build-AnalogClockB-Desktop_Qt_5_8_0_MSVC2015_32bit-Release\release
a dll was created!!! I copied it in C:\Qt\5.8\msvc2015\plugins\designer....and...it appeared in Qt Designer!!! Wow!!Thank you all guys, your help was great!
39/40