Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML plugin don't work while using QDeclarativeView to load can work
Qt 6.11 is out! See what's new in the release blog

QML plugin don't work while using QDeclarativeView to load can work

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    today I tried the demo QML plugin of qt on winows 7 x64 , it is in examples/declarative/tutorials/extending/chapter6-plugins ,
    at first I build with qmake , mingw32-make , it said error
    libsupc++/vterminate.cc:91: undefined reference to `_imp___iob'
    and I searched it with google , and found some people meet the same problem , and the solution is to copy this project to other disc , then
    I copy to E://qt/demo , and build with qmake , mingw32-make , and but still it doesn't work , it seems everything is right , I can get the
    dll output in lib , while when I run app.qml , it said PieChart is not a type "PieChart" .
    then I tried to build them in main.cpp, see main.cpp
    @
    #include <QtDeclarative/QtDeclarative>
    #include <QtGui/QtGui>
    #include "piechart.h"
    #include "pieslice.h"

    int main(int argc,char **argv)
    {
    QApplication app(argc,argv);
    qmlRegisterType<PieChart>("Bruce",1,0,"PieChart");
    qmlRegisterType<PieSlice>("Bruce",1,0,"PieSlice");
    QDeclarativeView view;
    view.setSource(QUrl("Test.qml"));
    view.show();
    return app.exec();
    }
    @
    and Tested , it works , why the plugins don't work , while using QDeclarativeView to load them can work .

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved