Hi Friends,
got stuck with Qwt (5.2.1) trying to print a plot nicely on a QPrinter.
I have a QwtPlot with many curves (about 40 of them). Not regarding the need of so many curves in one canvas, I would like to print out the full canvas with the legend besides it.
If i try the straight forward way (QwtPlot:: print()), I get the Canvas resized nicely to fit the page, but the Legend is not sized down to fit all Items on the page. Instead, it paints them in normal font size overpainting the pageRect that I pass to the QwtPlot:: print() method.
Qt Code:
QwtPlot* myPlot; /* here follows the filling of my plot */ myPlot->print(&painter, printer->pageRect()); painter.end();To copy to clipboard, switch view to plain text mode
I already tried to modify the QwtLegend::legendItems(), each changing font size, margins etc. Nothing seems to help, the legend on the print looks always the same.
I would expect the QwtPlot:: print(...) method to paint the whole plot including the legend inside(!) the given rect and (if needed) scale down the legend.
Anyone with suggestions to get that working?
Thank you for any help.
Best regards,
Viktor
Bookmarks