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. Mixing Qt Mobility C++ and Declarative
Forum Updated to NodeBB v4.3 + New Features

Mixing Qt Mobility C++ and Declarative

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 2.0k 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
    theoriginalgri
    wrote on last edited by
    #1

    Hello,

    is there a way to use both, c++ and qml together without reloading all the data?

    In my project the backend is mostly written in c++ and exposed to qml via qmlRegisterType(). The c++ backend has instances of QContact which I also want to expose to qml. The qml bindings for Qt Mobility are not exported nor have Q_INVOKABLE functions to set a existing QContact ( https://qt.gitorious.org/qt-mobility/qt-mobility/blobs/master/plugins/declarative/contacts/qdeclarativecontact_p.h#line92 ), so how am I supposed to use this? The qml bindings themselves don't offer a QContactManager equivalent, just models which can search the contact again (stupid if I already have a c++ instance).

    So Is there "the right way" to mix c++ and qml?

    PS: I could of course call the setContact() function of QDeclarativeContact since I know its position but this is the most evil way :)

    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