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. The model data in the model data
Forum Updated to NodeBB v4.3 + New Features

The model data in the model data

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

    hello
    i have ListView control with some model. it is list of peoples. each people have number of mobile phones. so each item in list of peoples control must show 1...n items of mobile phones, color of phone, model of phone and image of phone. i need fill all data via C++
    how i can do it by qml and c++?..

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      You probably want a tree model, not a list model. Let your top-level model have 1 column, and m rows for m people. Let each top-level item contain a child model with n rows for n phones. The child model should have 4 columns, one for each property of the phone (name, colour, model, image).

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      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