logicalDpiX/Y on QPixmap
Ch.Ehrlicher at gmx.de
Sat Jan 28 20:47:05 CET 2006
-----BEGIN PGP SIGNED MESSAGE-----
Jeremy Sanders schrieb:
> Hi -
> I'm running the latest version of Q...3/Windows, compiled on Mingw on
> Windows XP (this also occured on 2000). If I print out the logicalDpiX()
> and logicalDpiY() on a QPaintDeviceMetrics object generated from a
> painter on a QPixmap, then I get really silly values (102 and 25 DPI for
> X and Y). On Linux it returned the Dpi of the screen (96 DPI).
> QPaintDeviceMetrics works for windows themselves. I should say that I'm
> using PyQt (though I don't think this is PyQt specific).
> I include a PyQt program to demonstrate the problem. The two DPI values
> should be the same.
There was a small problem with
QPixmap::metric(QPaintDeviceMetrics::PdmDpiY). I've fixed this
(qpixmap_win.cpp rev. 220.127.116.11.2.41) and now the X and Y value should be
But I don't know why there is a difference to linux - do you maybe have
another resolution? But I think the calcualtions are correct.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the kde-cygwin