[Qt-interest] Unnecessary Rounding from QRectF to GCRect?

Sean Harmer sean.harmer at maps-technology.com
Tue Mar 29 16:11:37 CEST 2011


On Tuesday 29 March 2011 09:44:43 Stephen Chu wrote:
> Just find out this has much more impact than I originally thought.
> 
> One part of my project is using QGraphicsScene with inches as the unit.
> That is QPointF(1, 0) is 1 inch to the right of the origin. This makes
> conversion between pixels and physical length simple since all
> conversions are done inside of the items.
> 
> That all works great until I tried it on the Mac. This rounding is
> causing error up to 0.5 inch which in my case is typically 1200 pixels.
> 
> I did file a bug for this and hope for a quick solution:
> <http://bugreports.qt.nokia.com/browse/QTBUG-18416>
> 
> Right now I am testing for graphics engine at runtime and switch to
> QImage if it's Core Graphics. QImage doesn't have this rounding.

Why not just patch your build of Qt if you already have a solution to the 
problem? You could also file a merge request on gitorious and mention it in 
your bug report. Bugs get fixed much more quickly if you also supply a fix ;-)

Cheers,

Sean




More information about the Qt-interest-old mailing list