Integration of qwt plugin to qtdesigner?
I would like to know what is wrong with my steps towards a qwt integration into qtdesginer.
I copied the compiled qwt.* (lib, exp, dll) to C:\Programme\Qt4\lib and the qwt_designer_plugin.* files to C:\Programme\Qt4\plugins\designer.
The Qt Version is compiled with msvc. Qt is 4.3.4, Qwt 5.02 was compiled with msvc in release mode.
Matthias
Re: Integration of qwt plugin to qtdesigner?
What does Designer's "About Plugins" dialog box say about the Qwt plugin?
Re: Integration of qwt plugin to qtdesigner?
Quote:
Originally Posted by
wysota
What does Designer's "About Plugins" dialog box say about the Qwt plugin?
It complains that "containerextensiond.dll" and "taskmenuextensiond.dll" were compiled with "Windows msvc debug full-config" instead of "Windows msvc release full-config".
And that "qwt_designer_plugin.dll" is not a valid Qt plugin.
The files are available in release as "containerextension.dll" and "taskmenuextension.dll"
I compiled Qt4 (open source) for msvc using "configure -platform win32-msvc2005"
Why is qtdesigner using the wrong dlls?
Matthias
Re: Integration of qwt plugin to qtdesigner?
You are mixing release mode and debug mode libraries. Qt is compiled fine. containerextension and taskmenuextension are not (they are compiled in debug instead of release mode).
Re: Integration of qwt plugin to qtdesigner?
Quote:
Originally Posted by
wysota
You are mixing release mode and debug mode libraries. Qt is compiled fine. containerextension and taskmenuextension are not (they are compiled in debug instead of release mode).
Both are available in versions without suffix "d".
And I did not compile them any different then the rest of Qt. It could only be that Qt itsself does have a .pro file which says to compile them different.
If I compiled them wrong, I would need to know how to compile these dlls correct.
Matthias
Re: Integration of qwt plugin to qtdesigner?
What does the dependency walker say about qwt_designer_plugin.dll?
Re: Integration of qwt plugin to qtdesigner?
Quote:
Originally Posted by
wysota
What does the dependency walker say about qwt_designer_plugin.dll?
It complains about a missing dwmapi.dll. I have no idea what this is about, however I downloaded it and put it into the directory of the plugin. Thereafter no missing dll is in the list, but the dependency walker still complains that 'Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.'
The error in the plugin list of the designer still remains.
Funnywise, if I use mingw then everything works fine without any errors. It would however prefer not to have a seperate Qt mingw installation just for the designer.
Matthias
Re: Integration of qwt plugin to qtdesigner?
How did you compile the plugin? Does Designer depend on mingw? How did you compile Designer? Does it depend on Qt libraries or are they compiled into the binary statically?
1 Attachment(s)
Re: Integration of qwt plugin to qtdesigner?
Quote:
Originally Posted by
wysota
How did you compile the plugin? Does Designer depend on mingw? How did you compile Designer? Does it depend on Qt libraries or are they compiled into the binary statically?
The makefile of the plugin is attached. I compiled using the msvc cmd prompt using qmake, nmake with
"CONFIG += release"
"CONFIG += QwtDesigner"
in qwtconfig.pri
The designer was compiled with all the rest of Qt and has nothing to do with mingw. And since I do not know how I should build it with static linked libaries I assume that Qt Makefiles provide libary depending binaries.
So basically, Qt was compiled as usual, and Qwt with 'release' and both with Visual Studio and 'nmake'
mingw binaries and not even in the PATH and can not be found during compilation.
Matthias
Re: Integration of qwt plugin to qtdesigner?
So where does the mingw dependency come from? Or maybe I simply misunderstood you... Make sure all components are compiled in the same mode (release or debug) and all dependencies are met. That should be enough for the plugin to be visible. If the dependency walker complains about something, try to pinpoint what exactly it is warning you about.
Re: Integration of qwt plugin to qtdesigner?
Quote:
Originally Posted by
wysota
So where does the mingw dependency come from? Or maybe I simply misunderstood you...
I compiled everthing twice( Qt, qwt). Once with msvc and second with mingw. Both builds are of course totaly independend on the other. If I use the mingw Qt and qwt version, then the mingw-build designer shows all plugins.
Quote:
Originally Posted by
wysota
Make sure all components are compiled in the same mode (release or debug) and all dependencies are met. That should be enough for the plugin to be visible. If the dependency walker complains about something, try to pinpoint what exactly it is warning you about.
I am very sure that I compiled everything in release mode.
The only warning I get is
Quote:
'Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.'
which does not help me really.
I now compiled qwt again in debug mode. Then I copied qwt.dll to qt/bin to be sure that designer uses the debug version of qwt and copied the debug version of the plugin to plugins/designer.
Now it is loaded. However the complain that "containerextensiond.dll" and "taskmenuextensiond.dll" were compiled with "Windows msvc debug full-config" instead of "Windows msvc release full-config" still remains. But that does not hinder the qwt plugin to be loaded.
So my result seems to be that qwt has to be compiled in debug mode so that the designer can load it. It would probably a lot easier if there was a Installation information in qwt. All information about the integration into desinger I had found in forums like this.
Matthias
Re: Integration of qwt plugin to qtdesigner?
Designer should be compiled in release mode and work with release mode compiled components. You can't mix the two modes. If at least one of the components is compiled in another mode than the rest (Qt, Designer, Qwt, plugins) it will simply not work. It is all written in Qt docs and it should all work just fine by default unless you do some customizations on your own.
Re: Integration of qwt plugin to qtdesigner?
Quote:
Originally Posted by
wysota
Designer should be compiled in release mode and work with release mode compiled components. You can't mix the two modes. If at least one of the components is compiled in another mode than the rest (Qt, Designer, Qwt, plugins) it will simply not work.
I know.
Quote:
Originally Posted by
wysota
it should all work just fine by default unless you do some customizations on your own.
That is what I did not. Neither Qt or Designer. But the qwt-files did not work (release mode).
But if I change the mode to debug in qwt then they work.
Re: Integration of qwt plugin to qtdesigner?
This implies your Designer is compiled in debug mode, which is certainly not the default when building Qt. You must have at least passed a "-debug" switch to configure (instead of -debug-and-release).
Re: Integration of qwt plugin to qtdesigner?
Quote:
Originally Posted by
wysota
This implies your Designer is compiled in debug mode, which is certainly not the default when building Qt. You must have at least passed a "-debug" switch to configure (instead of -debug-and-release).
I did 'configure -platform win32-msvc2005' which was copied from the tutorial http://mm-werkstatt.informatik.uni-a...als/qt2005.pdf
But I thing we can stop debating about this issue. I understand why things do not work, though I do not know how this inconsistancy came. But this way it is working right now.
Re: Integration of qwt plugin to qtdesigner?
What does the dependency walker state about Designer's binary? Does it rely on debug or release version of Qt's libraries?
Re: Integration of qwt plugin to qtdesigner?
Quote:
Originally Posted by
wysota
What does the dependency walker state about Designer's binary? Does it rely on debug or release version of Qt's libraries?
It is release.
in qwt_designer_plugin Qt is release but qwt.dll is debug with Qt debug dlls.
This is the way it works.
Re: Integration of qwt plugin to qtdesigner?
Hmmm... theoretically this is impossible... :cool:
1 Attachment(s)
Re: Integration of qwt plugin to qtdesigner?
Quote:
Originally Posted by
wysota
Hmmm... theoretically this is impossible... :cool:
It really is. As soon as I move the mouse over any of the selection of qwt widgets in qtdesigner it crashes.
Screenshot attached.
Matthias
Re: Integration of qwt plugin to qtdesigner?
Hey there!
I also had exactly the same problems as explained in this thread. And I resolved them successfully with compiling Qwt in DEBUG mode. I too have compiled Qt 4.3.4 with win32-msvc2005, not with mingw. Now I see Qwt widgets inside Designer. But I have no crashes when going over Qwt widgets in Designer. I can add them to forms with no problems. One problem still remains: Qwt widgets are still not visible inside Visual Studio. What must I do to get them inside Visual Studio too?
I noticed something interesting: if I try to load this plugin under designer, that is a part of precompiled commercial qt 4.3.3, I get error about Qwt plugin using incompatible Qt library (4.3.4 - release). So I built it with DEBUG flag, but it uses release version of Qt? At least it works under 4.3.4 compiled from source code with Visual Studio.