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
Forum Updated to NodeBB v4.3 + New Features

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.1k 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.
  • B Offline
    B Offline
    brucewuu
    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 .

    wish all the best to you from
    bruce wuu
    Autodesk China Inc.
    SW Developer
    M&E Product Developerment Group
    Work 137 6411 8921
    bruce.wu@autodesk.com

    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