Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
4.8.2, 4.8.3, 5.0.0
-
None
-
My system is Gentoo Linux, QT 4.8, KDE 4.8.
Description
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.