Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QML/C++ Integration using VS2008

    QML and Qt Quick
    1
    1
    1701
    Loading More Posts
    • 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.
    • F
      frankiefrank last edited by

      New to Qt Quick, forgive the newbie status. :)

      I've seen the Developer Days 2010 presentation on integrating C++ with QML.
      http://developer.qt.nokia.com/videos/watch/qt_quick_for_c_developers

      When implementing some parts myself I've encountered some issues, perhaps related to the fact I'm using VS2008 for my Qt development and QtCreator for editing just the QML part.

      1. When using @QDeclarativeContext->setContextProperty()@ - shouldn't this call also create a slot for the property?

      For example:
      in cpp:
      @mContext->setContextProperty("currObjectName", currObjName);@

      When I try to include this block in QML I can no longer load it into my view:
      @ onCurrObjectNameChanged: {
      myText2.text = "change"
      }@

      Does that mean that there's no onCurrObjectNameChanged slot and signal connection? Should I just create my custom object "listener" and register it in QML with its own registered slot connections?

      1. Is there a way to have the environment of VS2008 integrate better with QML files? I'm talking specifically about the recognition of dynamically created properties, can it work like the above link's video demonstration of that behavior in Qt Creator? Currently, having them disconnected means I'm writing in the dark on the QML side.

      "Roads? Where we're going, we don't need roads."

      1 Reply Last reply Reply Quote 0
      • First post
        Last post