Thanks I followed your signal approach, and it seems to have solved the problem. However, I have found that 'QwtPlot' method in the main thread is slow and thus blocks the main thread. Is it possible that the plot building is done in the main thread but the plot saving is done in a secondary thread.
Specifically, I want to want to move the following code from the main thread to a secondary thread.
QwtPlotRenderer renderer;
renderer.setDiscardFlag(QwtPlotRenderer::DiscardBackground, true);
renderer.setLayoutFlag(QwtPlotRenderer::KeepFrames, false);
renderer.
renderDocument(plot, pngfile,
"png",
QSizeF(300,
200),
300);
QwtPlotRenderer renderer;
renderer.setDiscardFlag(QwtPlotRenderer::DiscardBackground, true);
renderer.setLayoutFlag(QwtPlotRenderer::KeepFrames, false);
renderer.renderDocument(plot, pngfile, "png", QSizeF(300, 200), 300);
To copy to clipboard, switch view to plain text mode
Will Qwt let me do that?
Bookmarks