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

QWidget::render(QPainter*,...) doesn't apply transformations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 4.8.2, 4.8.3, 5.0.0
    • None
    • My system is Gentoo Linux, QT 4.8, KDE 4.8.

      QWidget::render(QPainter*,...) documentation at https://qt-project.org/doc/qt-4.8/qwidget.html#render-2 says that this function will use transformations applied to the QPainter instance. However, the QPainter::deviceTransform() transformation is ignored.

      For example when you render custom widgets in an item delegate, QPainter::deviceTransform() holds the translation coordinates from the parent window to the view widget. Because of this bug, the rendered custom widget is placed relative to parent window instead of the view widget.

      QWidget::render(QPaintDevice*,...) uses the transformation correctly but sometimes cannot be used as a substitute because the QPainter instance is owned by another object and has non-empty state stack.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            next_ghost Martin Doucha
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes