Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. Synchronizing multiple Qt/QML Applications
Forum Update on Monday, May 27th 2025

Synchronizing multiple Qt/QML Applications

Scheduled Pinned Locked Moved Brainstorm
5 Posts 2 Posters 3.3k Views
  • 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
    msantoli
    wrote on last edited by
    #1

    Hi,

    I was thinking wether it was viable to have multiple Qt/QML applications ( possibly running on different computers ) synchronized together.
    My idea was to have a videowall application, where each monitor was driven by a single computer ( embedded solution ), all rendering the same Qt/QML application but each rendering a different portion of it and all being synchronized together.
    I really new to Qt/QML development and wanted to have some hints from the community.

    Thanks
    Massimo

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

      Hi and welcome to devnet,

      You would have to use some form of IPC to keep things in sync. Since you have one computer per screen, a network solution is the most likely. Something using i.e. QTcpServer and QTcpSocket.

      Hope it helps

      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
      • M Offline
        M Offline
        msantoli
        wrote on last edited by
        #3

        Thanks,
        Definitely some kind of IPC has to be setup for keeping in sync the various computers. Before entering in the sync part I was also investigating wether it was possible to define different coordinate systems for each monitor. For example, if I have a setup with two 1280x720 monitors side by side ( horizontally) to achieve an virtual 2560x720 resolution, and then I have two qml files running on each computer. First computer is no problem since it has the drawing area 1280x720, on the second instead I would like to have the coordinate system translated by 1280 on the x-axis, so that it will start drawing from 1280 to 2560... I'm starting to experiment with the
        transform: Translate { x: ... }
        command... Wanted to know it you think this is the correct approach in changing the coordinate system.
        My QML on the second monitor looks something like this:

        Rectangle {
        id: screen

        width: 1280
        height: 720
        
        transform: Translate { x: -1280 }
        

        ...
        ...

        }

        The -1280 translation should achieve the nothing is drawn on the screen unless its x coordinate is > 1280.

        Massimo

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

          This would then mean that each embedded computer will have the same qml file and only render a part of it ?

          An alternative would be that each of your embedded systems would only act as screen like a multi-head computer setup (thin client comes to my mind but it's not exactly that). You main computer would then render one big qml file across all the screens connected.

          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
          • M Offline
            M Offline
            msantoli
            wrote on last edited by
            #5

            Yes the idea is to have the same qml file ( more or less - I'm still investigating if this is possible ) on each device and each device renders the part for its screen.
            I think this is easily achievable when the qml has static parts and no animation. I trying to figure out how to make it work when you have animation, simple example: a square that moves horizontally from one to screen to the next...

            In my example I have a timer that every second moves the rectangle of 10pixel to the right, to make everything work I need to have the two timers of the two devices synchronized... and this is what I'm trying to look in the sources of Qt....

            Your idea could be a solution, do you think its feasible? The problem is that when you have a big videowall ( 3x3 or 4x4 ) I don't think a single computer has the power to render at a decent frame rate the whole setup..

            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