Any way to "render" an off-screen plot with lots of data to speed up loading?
Per the title -- I have a QStackedWidget controlled by a QComboBox. Each page in the stacked widget contains a plot, some more populated than others.
When switching pages via the combo box, the UI freezes for a couple of seconds as it tries to paint the new plot; this is specially bad on complex plots.
After switching plots once and switching pages back, it's fast.
I'm wondering how folks handle this to avoid locking-up the UI? Can the non-visible plots be forced to "paint" by some mechanism? Or is there another way?
Re: Any way to "render" an off-screen plot with lots of data to speed up loading?
The content of the canvas is rendered to a pixmap, before it gets painted to the widget. So as long as size and content of the plot canvas does not change you won't have any expensive operation regardless of the heaviness of your plot. Painting the canvas is done by QwtPlotCanvas::paintEvent.
Uwe