Hello everybody.
I'm trying to port an application from QT4.x to QT5.5 and Qwt5.2 to 6.1-multiaxes in windows7 32bit.
I successfully compiled both the application ad the new QWT (qwt-code-228-branches-qwt-6.1.-multiaxes).
Now I am facing an error while loading a simple ui file containing a qwtPlot object.
QT and QWT dlls, as well as plugins (C:\app and C:\app\plugins) are in the same directory of the application.
The code is the following:
loader=new QUiLoader();
//loader->addPluginPath(BasePath+"/plugins/designer");
QStringList pluginpaths=loader->pluginPaths(); // C:\app\plugins\designer; c:\app\designer
QStringList availablewidgets=loader->availableWidgets(); // no qwt objects here
MainWindow=(QMainWindow*)loader->load(&file,0); // ok, window is loaded
varQwt = MainWindow->findChildren<QwtPlot *>(); //no QwtPlot objects found
Debugging the code I find that availablewidgets() returns a list without qwt objects.
Copying designer.exe in c:\app I can load the ui file and add see qwt objects.
Any hints?
Thanks in advance
EDIT:
OK, the problem was very simple, after found...
QWT debug_and_release switch builds only release the plugin.
So I built the debug plugin versione and installed in the usual directory (I called it qwt_designer_plugind.dll).
Using the application debug version the plugin wasn't loaded automatically, so availablewidgets() did not find the qwt objects.
Valentino
Bookmarks