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. One Models for two View

One Models for two View

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

    Hello,

    I would like to receive information via the serial link and update a QML interface.
    I'd like to do this properly with a model-view-delegate architecture, but I don't know how to go about it because in my received data, there's a part I want to display in a ListView and a specific delegate, and a second part in another ListView and its specific delegate.

    I don't know how to do this properly.

    • Should I import a C++ class into QML to manage my serial link with two models (feasible?)?
    • Should I import a single large C++ model and filter it in my ListView?
    • Any other way I don't know about?

    Do you have an idea of a good way to do this? Thanks for your help.

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

      Hi,

      If you have all the information you need within on model, there's no reason to split it especially if you have a single input such as a serial port.

      You should be able to configure your views to show exactly what you want from the model. Worst case, you can put proxy models between but it does not look like you would need that in your case.

      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