Hi there,
how can I synchronize the ScrollBar of two QGraphicsView objects?
Hi there,
how can I synchronize the ScrollBar of two QGraphicsView objects?
Hi, you can get the scrollbars using horizontalScrollBar() or verticalScrollBar(), then connect the valueChanged() signal of one scrollbar to the setValue() slot of the other.
I hope this does not trigger an endless loop of changes...
Ginsengelf
You can always check to see if the sender() is yourself or if the new position is the same as the old position. If either one is true, you do nothing and the loop stops. I don't remember if setPos() results in a signal or not.I hope this does not trigger an endless loop of changes...
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks