Results 1 to 1 of 1

Thread: Using QUiLoader to load qwtPlot [SOLVED]

  1. #1
    Join Date
    Aug 2015
    Posts
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Using QUiLoader to load qwtPlot [SOLVED]

    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
    Last edited by VALE61; 11th August 2015 at 13:32. Reason: Problem solved

Similar Threads

  1. QUiLoader & *.qrc files?
    By chouqud in forum Newbie
    Replies: 5
    Last Post: 5th February 2014, 18:10
  2. QUiLoader and protobuf
    By waiter in forum Qt Programming
    Replies: 1
    Last Post: 8th February 2013, 08:39
  3. QUiLoader and .qrc
    By hypnotic401 in forum Qt Programming
    Replies: 0
    Last Post: 17th September 2012, 16:27
  4. undefined reference to `QUiLoader::QUiLoader(QObject*)'
    By ashukla in forum Qt Programming
    Replies: 7
    Last Post: 7th October 2011, 18:05
  5. Advanced use of QUiLoader
    By doberkofler in forum Qt Programming
    Replies: 2
    Last Post: 28th October 2009, 15:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.