Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Question: how to develop qt extensionplugin with C++ code bringing data and qml showing the data
Forum Updated to NodeBB v4.3 + New Features

Question: how to develop qt extensionplugin with C++ code bringing data and qml showing the data

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 496 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.
  • T Offline
    T Offline
    tph2003
    wrote on last edited by
    #1

    I have developed a simple qt project which get data using C++ code and expose it to qml.In the project I used QQuickView::setContextProperty to expose a QObject instance "shelper" to qml and QmlContext::setSource to set target qml. the exe execute successfully showing data in "shelper".

    Now, I need to develop a project with same function but output as a plugin which can be called by other project. I reffer to "QML Plugin Example" and use QQmlExtensionPlugin to impliment it but I failed. Using the qmlscene.exe I can see all elements defined in qml except elements showing data . Reffer to the previous exe version. I find that QQmlExtensionPlugin has no function or visitor to set qml source and so no qml is set as the source to which QObject "shelper" is exposed.
    

    Anyone know how to develop qt extensionplugin with C++ code bringing data and qml showing the data?

    information:
    Qt 5.2.0(windows qt-windows-opensource-5.2.0-msvc2010-x86-offline)

    Any help would be appreciated!

    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