Hello,
I am trying to implement a printing method that allows the user to pick the size of the plot in millimeters, while keeping the aspect ratio. So far I have achieved a fixed 1:1 aspect ratio for the widget display, but when it comes to printing, I don't know how to keep this ratio. It would be simple if I would only print the canvas, since I would just need to set both width and length to be equal in the QSizeF. However, I want to be able to decide whether to include the bottom x and left y axis in the printed file, and therefore I don't know how to set the QSizeF in such a way that the axis widgets are included and the canvas remains nice looking, that is, with the fixed aspect ratio.
I am still collecting information, but I am getting confused with the settings, that is, should I set the parameters on the QPrinter, on the QPainter or on the QPlotRenderer?
I would be very grateful if someone could give me some directions to follow,
Thanks,
Jorge