Important: Please read the Qt Code of Conduct -

GUI plotting 3 types of data streams from one thread.

  • Hi all,

    I am trying to plot data coming from one thread, for now. The data is processed inside that thread and produces 1 to 3 different results which need to be plotted.
    When it is one result I am sending a signal with shared pointer to the GUI and it is working. However when I need to send 3 results I tried to use QMap to be able to key each result but I would need to registered QMap<int, RealVecSmartPtr>.

    I am not sure if this is ok to register QMap in the same way I did it with the shared_ptr, it does not look good IMHO and based on some forums I had checked. I do not have much experience on how to accomplish this in a good clean way.

    Not sure if creating 3 signals for each results instead of using QMap.

    Any insight from you developers QT senseis will be much appreciated,

    Thank you.

  • Lifetime Qt Champion

    First - why don't you simply try it out?
    Second - why a map and not a vector?

  • @Christian-Ehrlicher Thank you for your suggestion, in the first place, I would like to go and test it just to learn more which is really good but I have spent a lot learning and developing other things for this QT project and it is about to be delivered, and unfortunately do not have much time to choose one option and then a week alter come back to same place I started. I am an RF/FPGA Hardware engineer and I was assigned this project which I found really cool but now I do not have the luxury to test, as soon as I finished I will keep learning more about QT in my spare time :).
    Secondly, thanks again, I will check std::vector.

Log in to reply