Fix unit test for qpainter.
Merge pull request #146 from enthought/fix/qpainter-tests

QPainter backend fixes