[Interest] synchronize multiple graphicsviews

Christoph Kurz c.kurz at melph.de
Tue Sep 10 13:41:58 CEST 2013



> > Good morning,
>  >
>  > I have something like profiler and each thread is contained in its own
>  > graphicsview. On the x axis is time of course and i want the setpos in
>  > one thread to be propagated in the others.
>  >
>  > So i hooked the horizontalScrollBar::valueChanged and i am trying
>  > to dispatch the signal to other views.
>  > The thing is (as you probably guess already) that these fires the
>  > signal too, so i end up in a loop.
>  >
>  > But when i block the signals, the view's position does not get
>  > updated. I tried (i think) to call every setscenerect, update,
>  > viewport->update etc but don't succeeded to get the view visualy
>  > updated.
>  >
>  > What is the best way to do this?
>  >
> 



Have you tried to use QObject::disconnect() instead of blockSignals(true) ?

It should work, though I don't know about the performance of using connect() and
disconnect() all the time.

Especially if you have lots of different views it will also result in a lot of
code.

Hope that helps



> > Many thanks,
>  > Mojmir
>  > _______________________________________________
>  > Interest mailing list
>  > Interest at qt-project.org
>  > http://lists.qt-project.org/mailman/listinfo/interest
>  > <http://lists.qt-project.org/mailman/listinfo/interest>
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130910/74b41613/attachment.html>


More information about the Interest mailing list