Important: Please read the Qt Code of Conduct -

Multiple interdependent windows should be updated simultaneously

  • In my application I am taking a live image from an image source and then applying several image processing techniques on it to evaluate several parameters at run time. Now i have widgets on this application clicking on which another window will be opened with one particular characteristic in that image(say Frequency response of the incoming 'real time' image signal). Now in the frequency response window i have several other widgets which may work on the frequency response plot and give me another window with say another plot. Now I want all these 3...4...n number of interdependent windows to get updated simultaneously. Please suggest what in your opinion would be the most optimal method to achieve this so ask to minimize the delay and maximize performance.

  • Hello xenonforlife,
    Your thread is not very clear. I don't know which object you are using to contain the images and neither if images should be updated by user interaction (1st case) or continuoslly (2nd case).

    1st case
    You should connect the signal emmited by the user (as a QMouseEvent or a QKeyEvent) to the update() or paint() method of your image container (for example QPainter::drawPicture())

    2nd case
    Create a QTimer object and set the update time period. Then connect the signal emitted to all your containers update() slots or to one function that calls all of the others.
    @QTimer *timer = new QTimer(this);
    connect(timer, SIGNAL(timeout()), this, SLOT(update()));

  • Thanks a lot for your reply, that surely helps. Yes I am more interested in the second case which is the one with real time continuous images.Thanks again

Log in to reply