View Full Version : How to stop QwtPlot::drawItems when moving scroll bar
we have several curves attached one plot, which is inside a QScrollArea. When moving the slider , Qt run QwtPlot::drawItems repeately . How can I stop it ?
As the drawitems takes some time , it doesn't response quick enough when moving the slider.
Putting QwtPlot to a QScrollArea is usually not a good idea When zooming in deep with a scroll area the plot widget gets huge in size:
memory issues: e.g think of the backing store of the canvas !
performance also might slow down heavily as you disable all Qwt drawing optimizations and you will run into QPainter bottlenecks
Using scrollbars like in the realtime example ( zoom in and you see them ) is preferable
But concerning your question: the plot canvas has a backing store ( at least if you didn't disable it ) and I don't see why scrolling a plot inside a QScrollArea should be a reason for not using it, as it only gets invalidated:
resize event for the canvas
replot from the application side ( disable the auto replot feature to be sure ).
Uwe
oh,I have the backing store disabled. Now it works better .
Thanks
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.