View Full Version : Qwt plot with scrollbar
CodingQt
13th November 2013, 18:28
Hi,
I am using qwtplotpanner for scroling x axis on qwt plot.
My question is, I have 4 such plots on one screen and I want to change all plot together using qwtplotscanner.
Is there any way so that if I move one plot all other plot will move with it?
Uwe
14th November 2013, 08:04
Depends on when you want to synchronize the plot:
If you want to have them synced, while the panner is active the only "easy" solution I see is to send mouse events ( or implement a bridge calling the protected widgetXYEvent handler ) to panners of the plots - remote controlling them.
If it is good enough to sync the scales, after panning has been done, you can simply connect to the QwtScaleWidget::scaleDivChanged() signal. Note, that is a common way how to sync plot scales according to user interaction - not only for the panner. But avoid creating an endless signal ping pong, f.e by disabling the connections temporarily inside of the slot.
Uwe
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.