Results 1 to 2 of 2

Thread: QwtPlotRenderer from MM to Pixel

  1. #1
    Join Date
    Dec 2017
    Qt products

    Default QwtPlotRenderer from MM to Pixel

    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,

  2. #2
    Join Date
    Nov 2006
    Dresden, Germany
    Thanked 6 Times in 6 Posts
    Qt products
    MacOS X Unix/X11 Windows

    Default Re: QwtPlotRenderer from MM to Pixel

    Hi Jorge,

    what is the intended target format: raster (jpeg/png) or vector?


Similar Threads

  1. Replies: 0
    Last Post: 1st February 2014, 16:35
  2. Filling a pie pixel by pixel
    By pradhan in forum Qt Programming
    Replies: 1
    Last Post: 10th December 2013, 08:33
  3. Replies: 2
    Last Post: 16th February 2012, 23:10
  4. Possible bug in QwtPlotRenderer
    By BettaUseYoNikes in forum Qwt
    Replies: 1
    Last Post: 29th November 2011, 08:00
  5. QPixmap pixel by pixel ?
    By tommy in forum Qt Programming
    Replies: 19
    Last Post: 3rd December 2007, 22:52


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.