Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. AbstractListModel design question
Qt 6.11 is out! See what's new in the release blog

AbstractListModel design question

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 424 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.
  • R Offline
    R Offline
    Redman
    wrote on last edited by
    #1

    Hello,

    Im new to AbstractListModels and I am not quite sure if the approach I think of is "correct".

    I have a class which is mainly a composition of 4 other classes. Think of it as a config with categorized sub-configs. The config class itself holds no data other than the sub-configs.

    Now, I'd like to display the sub-configs in qml via QAbstractListModel.

    I know following approach would work, but is it the "right" one? 053573b8-5f59-476b-a362-69a84e214fc1-image.png

    This seems like an overcomplicated tree to me. Maybe a QAbstractItemModel would be the correct choice? But the resources on implementing a tree is meager.

    Any advice is appreaciated

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you looking for something like the editable tree model example ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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