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. Rethinking my project: need ideas for Dashboard software programming
Forum Updated to NodeBB v4.3 + New Features

Rethinking my project: need ideas for Dashboard software programming

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

    Hello Community,

    I have to rethink my development and I need your advice because I can't get any results.
    I have a software that loads a configuration at startup.
    I have now solved this with a JSON. It contains so-called DataSources with the properties ID, name, data type.
    When loading the data sources, I created an object for each one and packed it into a QAbstractListModel via Qlist<myobject>.

    In my current attempt I loaded these data sources into a QAbstractListModel to display them in QML. But this doesn't work because I can't access elements from the model in "realtime":

    The program should work in such a way that one chooses one or more data sources by dropdown list (or similar) and creates a gauge with the desired source.
    The data is sent via UDP to my program. with a tickrate of minimum 100 Hz

    Which is the best approach to manage the data sources and then display them or access them individually in QML? With my approach (QAbstractListModel) I don't get a result because I can't access single elements from the model so they will be updated in QML in real time. Maybe there is a much better approach.

    Here the current repo!
    https://github.com/BastianGschrey/topic-97612

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

      Hi,

      Rather than expected people scanning your complete project, you should rather post the bits that are currently posing problems or at least point precisely where they can be found.

      As for your problem, QAbstractListModel is completely usable with QML.

      One thing to take into account: refreshing data at at least 100Hz is useless, most of the current monitors works at 60Hz and the human brain processes 25 frames per second at most.

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

      S 1 Reply Last reply
      2
      • SGaistS SGaist

        Hi,

        Rather than expected people scanning your complete project, you should rather post the bits that are currently posing problems or at least point precisely where they can be found.

        As for your problem, QAbstractListModel is completely usable with QML.

        One thing to take into account: refreshing data at at least 100Hz is useless, most of the current monitors works at 60Hz and the human brain processes 25 frames per second at most.

        S Offline
        S Offline
        Slash200
        wrote on last edited by
        #3

        @SGaist The problem is that I can't get help here with getting access to single items from QML. I also can't find a documentation how to solve this. Only how to show the complete content of the model in a list.

        If you can tell me how to get access to a single item from QML and get it updated automatically updated it would be very helpful for me

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

          If you are interested in only a single element value, are you sure that a model is the best way to handle that ? You should maybe consider setting up some watcher object based on some selection or configuration.

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

          S 1 Reply Last reply
          0
          • SGaistS SGaist

            If you are interested in only a single element value, are you sure that a model is the best way to handle that ? You should maybe consider setting up some watcher object based on some selection or configuration.

            S Offline
            S Offline
            Slash200
            wrote on last edited by
            #5

            @SGaist no i'm not sure if it is the best way, thats why I'm asking
            But it was the only way that i found, how to handle/organize objects that where created during runtime.
            Do you have a example for those "watcher objects" `?

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

              What are these objects you want to organise ?

              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