Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-53801

QWidget::render() does not perform correctly on retina screen

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.6.0
    • GUI: Painting
    • OSX
    • macOS

    Description

      When we want to support hidpi raster content the use of QWidget::render() is not correct and produce completely transparent background in some area.
      The transparent area color is not random and correspond to the QImage::fill() color given meaning that some area are not drawn at all.

        const qreal ratio = widget->window()->devicePixelRatio();
        QImage img(widget->size() * ratio, QImage::Format_ARGB32);
        img.setDevicePixelRatio(ratio);
        img.fill(Qt::transparent);
        widget->render(&img);
      

      As you can notice too, style are wrongly drawn (bottom line in each QToolBox sections).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            filipe.azevedo Filipe Azevedo
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes