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. Populating QAbstractListModel's current item values in controls
Forum Updated to NodeBB v4.3 + New Features

Populating QAbstractListModel's current item values in controls

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 754 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.
  • G Offline
    G Offline
    Ghost
    wrote on last edited by
    #1

    I have the following UI in my application:

    !http://i.imgur.com/8Nc5UzR.png(UI)!

    The ComboBox (Qt Quick Control 5.1) would use a QAbstractListItem-based subclass to populate itself. A subclass instance would be exposed to the QML through setContextProperty("dataModel", &dataModel).

    Now, based on the current index of the ComboBox, I want to populate the rest of the controls, using dataModel's current object.

    Basically, I am not getting hold of how to access the dataModel instance (and the underlying data store) everywhere in the app.
    Or is my approach wrong? If so, then what would be a better alternative?

    Bhoot

    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