> From: 梁伟钟 [l...@xdt-inc.com]
> Sent: Thursday, January 23, 2014 10:05
> Subject: [Interest] curve’s width in inch on different displays
>
> Hello,  I would like to set curve's width in inch and make sure it shows the 
> same size on different 
> displays with different resolutions.  How to do it ? Please help ,it's 
> important. Thanks!

Qt reports a screen's dpi value:
   http://qt-project.org/doc/qt-5/qscreen.html#logicalDotsPerInch-prop
...on Qt4, use something like QApplication::desktop()->physicalDpiX()

Then just do:
   curveWidthInPixels = curveWidthInInch * dpi

(This will of course only be precise if the platform reports the correct dpi to 
Qt)
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to