PDA

View Full Version : Integration of qwt plugin to qtdesigner?



pospiech
8th March 2008, 18:43
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

wysota
8th March 2008, 19:29
What does Designer's "About Plugins" dialog box say about the Qwt plugin?

pospiech
8th March 2008, 19:44
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

wysota
8th March 2008, 20:41
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).

pospiech
8th March 2008, 23:30
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

wysota
8th March 2008, 23:53
What does the dependency walker say about qwt_designer_plugin.dll?

pospiech
9th March 2008, 09:45
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

wysota
9th March 2008, 10:02
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?

pospiech
9th March 2008, 10:29
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

wysota
9th March 2008, 11:22
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.

pospiech
9th March 2008, 11:57
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.



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


'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

wysota
9th March 2008, 14:10
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.

pospiech
9th March 2008, 15:16
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.


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.

wysota
9th March 2008, 15:46
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).

pospiech
9th March 2008, 15:50
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-augsburg.de/documents/tutorials/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.

wysota
9th March 2008, 15:52
What does the dependency walker state about Designer's binary? Does it rely on debug or release version of Qt's libraries?

pospiech
9th March 2008, 16:06
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.

wysota
9th March 2008, 16:18
Hmmm... theoretically this is impossible... :cool:

pospiech
9th March 2008, 17:43
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

Tiansen
9th March 2008, 18:05
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.

Tiansen
10th March 2008, 08:29
I already tried to copy qwt_designer_plugin.dll to Visual Studio Integration plugins directory but it is still not shown. Does Integration have some about plugins directory too?

Tiansen
10th March 2008, 09:58
I get this message when Visual Studio is loaded: QLibrary::load_sys: Cannot load C:/Program Files/Trolltech/Qt VS Integration/plugins/qwt_designer_plugin.dll (The specified module could not be found.)

No further information is given about what module is missing.

If I try to design some form with standalone Designer and then run it, it just exits when executing QwtPlot* qwtplot=new QwtPlot(); EDIT: I just had to move a qwtplot widget a little inside Visual Studio, so it started to uicing and mocing again and it suddenly started to work.

Tiansen
11th March 2008, 08:16
Ok, now I figured out some more things.

Problem with qwt plugin not showing in designer if built in release mode has been caused by miktex installation, that includes some qt libraries that were used instead of my custom build. I still have two questions:

1. My Qwt5.dll is now also built in release mode. But I noticed I can use it also in release mode only when building program with Visual Studio. If I build my program in debug mode, then my program just exits when trying to show a graph. How to solve this? Can Qwt be build with -debug-and-release option as Qt? I obviously need both versions. Or should I build debug and release versions separately?

2. Qwt plugin (built in release) now also works fine in Designer. However in Visual Studio it still does not work. I get this message: QLibrary::load_sys: Cannot load C:/Program Files/Trolltech/Qt VS Integration/plugins/qwt_designer_plugin.dll (The specified module could not be found.) According to Dependency Walker all dependencies are met and correct libraries are used.

radradish
21st July 2008, 20:52
Hi there

I had similar problem also - Qt designer (Qt v4.4.0) failed to load qwt v5.1.1 plugin compiled with mingw32 in release mode. The solution was to completely delete HKEY_CURRENT_USER\Software\Trolltech\OrganizationD efaults\Qt Plugin Cache 4.3.false\C:\Qt\plugins\designer registry key. Source: http://www.qtforum.org/article/21211/installing-qwt.html

Kind regards
Rad Radish