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/C++ Integration using VS2008
QtWS25 Last Chance

QML/C++ Integration using VS2008

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 1.8k Views
  • 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 Offline
    F Offline
    frankiefrank
    wrote on last edited by
    #1

    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
    0

    • Login

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