Qt5 - QtCreator doesn't load custom widget
-
Open the form(or a dialog) in QtCreator (Designer).Go to "Tools/Form Editor/About QtDesigner Plugins". And see if QtCreator can find your customWidgets. If yes, What's the Error that is given there?
-
There is some common errors that may occurred:
- If your customWidget has a dependency, the dll of dependency have to be in path of windows or place it somewhere that qmake can find it
- your QtCreator has to be built with the same version of Qt and same compiler have to be used(both mingw or both msvc)
- You have to build your plugin in release mode
- you have to put your dll in following paths:
a- Qt-root/msvc(or mingw)/plugins/designer
b- Qt-root/tools/QtCreator/bin/designer
-
I've mentioned it ! but you have to add dll into another path in tools/QtCreator/bin/designer
-
If you install your Qt from binary version you will have that path. But if you built your Qt: find folder location of QtCreator.
-
at this time i use the custom widget example from the Qt5 documentation. So there should not be some dependencies to external dlls.
The output from "About QtDesigner Plugins Info":
Cannot load library C:/Qt/Qt5.0.1/Tools/QtCreator/bin/designer/customwidgetplugin.dll: The procedure can't be find.
There was no system path set after installation, so i set it to the designer's plugin directory C:\Qt\Qt5.0.1\Tools\QtCreator\bin\designer.
I hope the QtCreator from the binary package is build with the same Qt version and is build with mingw! :-) At the time of Qt 4.6 it wasn't so, we have to build the custom widgets with msvc! But would this the case, i think there would be a other error message as i mentioned before.
Yes the widget is build in release mode!
I already copied the dll to C:\Qt\Qt5.0.1\Tools\QtCreator\bin\designer and C:\Qt\Qt5.0.1\5.0.1\mingw47_32\plugins\designer.
Because of your hint, i created the subdirectory /plugins/designer in C:\Qt\Qt5.0.1 and copied the dll into it => same error message!Thanks for your help, but have somebody other ideas?
Is there somebody who uses custom widets with Qt 5.x? -
[SOLVED] I have this exact problem with QScintilla designer plugin.dll.
- I have Qt sdk 5.2.1
- I have compiled Qt Creator from source with Qt 5.2.1 CMD console using mingw32-make && mingw32-make install. All went good.
How ever the GCC Creator says at tools-Form Editor-> About plugins:
Cannot load library C:/Qt/Qt5.2.1/5.2.1/mingw48_32/plugins/designer/qscintillaplugin.dll: The specified module could not be found.
I have compiled with same QT CMD console the qscintilla2.dll with mingw32-make && mingw32-make install. So the dll should be available for the Qt5.2.1 evironment. What is wrong here why Creator cannot load the plugin?
-
I have same problem:
i have QScintilla:qmake designer.pro
C:\Qt\Tools\mingw48_32\bin\mingw32-make -f Makefile.Release
C:\Qt\Tools\mingw48_32\bin\mingw32-make installNow i have this files:
in ../release/:- libqscintillaplugin.a
- moc_qscintillaplugin.cpp
- moc_qscintillaplugin.o
- qscintillaplugin.o
- qscintillaplugin.dll
I copied qscintillaplugin.dll in C:/Qt/Qt5.2.1/5.2.1/mingw48_32/plugins/designer/
and i view:
in tools-Form Editor-> About plugins:Cannot load library C:/Qt/Qt5.2.1/5.2.1/mingw48_32/plugins/designer/qscintillaplugin.dll: The specified module could not be found.
PLZ help me :(
-
Are you using linux or windows? Are us using default Qt Creator which came from MinGW Windows sdk?
These conditions have to met when using designer plugins:
- Qt sdk need to be build with your compiler (MinGW)
- Qt Creator need to be build with your compiler (MinGW)
- QScintilla Designer and Lib plugins needed to compile with your compiler (MinGW)
Other way the STDCALL will not work because name mangels different in GNU and MSVC.
You need to copy these to make designer plugin work:
- QScintilla2.dll to tools/QtCreator-MinGW/bin
- qscintillaplugin.dll to sdk/plugins/designer
-
I'm having the same problem with Qscintilla 2.8.3,
I'm using Qt5.2.0 with MingGw4.8, I followed the same instructions while making the files with MinGw32-make & MinGw32 Make install, I copied the files as follow:
qsintillaplugin.dll to : 1-: C:\Qt\Qt5.2.0\5.2.0\mingw48_32\plugins\designer
2-: C:\Qt\Qt5.2.0\Tools\QtCreator\bin\plugins\designer
qsintilla2.dll to: C:\Qt\Qt5.2.0\Tools\QtCreator\binthe tools-Form Editor-> About plugins displays:
Cannot load library
C:\Qt\Qt5.2.0\Tools\QtCreator\bin\plugins\designer\qsintillaplugin.dll: The specified module could not be foundin a console application it works fine I can use the editor but I need it within the designer to make GUI application
any help?
-
Hello,
I'm having the same problem and have not been able to extract a solution out of previous posts. I have followed the procedure described to have an integrable widget in qt designer, had it compile fine and detected by qt designer.
I first had an error due to the fact that I had built my library in debug rather than release but now I have built the library in release mode.
Going in Tools/Form Editor/ About... I see my plugin with error message :
Could not load ... library, the specified module could not be found.Any help would be appreciated !
-
Hello,
I'm having the same problem and have not been able to extract a solution out of previous posts. I have followed the procedure described to have an integrable widget in qt designer, had it compile fine and detected by qt designer.
I first had an error due to the fact that I had built my library in debug rather than release but now I have built the library in release mode.
Going in Tools/Form Editor/ About... I see my plugin with error message :
Could not load ... library, the specified module could not be found.Any help would be appreciated !
-
Hi and welcome to devnet,
Does your plugin have any dependency ? Did you compile it using the same compiler as your Qt Creator version ?
-
Hi and welcome to devnet,
Does your plugin have any dependency ? Did you compile it using the same compiler as your Qt Creator version ?
-
Hi and thank you for your greeting,
I don't think my plugin has any dependency, actually I took the exemple from qt documentation : the worldclock example.
I tried with two Qt installs, the first one was "qt-opensource-windows-x86-1.6.0-5-online" - I don't know how it was compiled - and the second "one qt-opensource-windows-x86-mingw491_opengl-5.4.0" which I'm guessing is compiled using mingw. My plugin is compiled with mingw. I get the same message with both. -
Hi and thank you for your greeting,
I don't think my plugin has any dependency, actually I took the exemple from qt documentation : the worldclock example.
I tried with two Qt installs, the first one was "qt-opensource-windows-x86-1.6.0-5-online" - I don't know how it was compiled - and the second "one qt-opensource-windows-x86-mingw491_opengl-5.4.0" which I'm guessing is compiled using mingw. My plugin is compiled with mingw. I get the same message with both.