Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.2.0
-
None
Description
Try to paint a rectangle of 100 x 100 on a QPainter of a QWidget in paintEvent and display it in a QPrintPreviewWidget.
Somehow the results on the screen differ on Windows, Linux and my MacOS X (Mavericks) machine.
Same code has different output (same on Mac + Linux) but different on Windows.
I paint a rectangle at position 0,0… and on Windows there is a white border (margin?)around the site, but same code
on linux and mac works as expected ( rectangle at 0,0 starts exactly in top left corner without any margins).
Printing and PDF export works great only the output of the pages of QPrintPreviewWidget differ.
See a screenshot attached dispalying the output on Windows and Mac…
See image with different results on windows and mac
https://www.dropbox.com/s/vorgq1czurksusd/Mac-Windows-Qt5.2-QPrintPreviewWidget-Bug.png
Then painting like this:
void TestSite::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.fillRect(0, 0, 500,500, QBrush(Qt::red));
}
Attachments
Issue Links
- is required for
-
QTBUG-37693 QtPrintSupport - Painting Issues
- Open
-
QTBUG-37698 QtPrintSupport - Dialog Issues
- Open