- 
    
Bug
 - 
    Resolution: Done
 - 
    
P2: Important
 - 
    5.9.1, 5.13.2
 - 
    None
 - 
    Environment 1:
Windows 10
Qt 5.13.2 for VS2017 from Qt Online installer
VS2019
Environment 2:
Windows 10
Qt 5.9.1 for VS2013 from Qt Online installer
VS2013 
- 
        
 - 
        f8a175afba12325dcff4aee21b1b11dfde3d57e4 (qt/qtbase/dev)
 
When painting on a QPicture and calling QPainter::setPen(Qt::black) before setting any other pen color this will later be ignored when playing back the picture inside another QPainter. Basically:
QPicture pic;
QPainter picPainter;
picPainter.begin(&pic);
picPainter.setPen(Qt::black); // ignored
...
picPainter.end();
QPainter painter(this);
picPainter.play(&painter);
There is a small example attached to reproduce the problem.
Reproduce the bug:
- Launch attached QPictureBug.zip
 - EXPECTED: one magenta line (top), one black line (bottom)
 - ACTUAL: two magenta lines
 
If found two different workarounds which can be used by providing command line parameters "-w1" or "-w2".