PDA

View Full Version : Make Widgets in Millimeter regardless of screen size, resolution



JACO
27th March 2008, 15:04
I am trying to draw widgets of fixed size regardless of screen size, resolution, etc.

For example, I want a button of size 22 millimeters x 18 millimeters on all screens, no matter the resolution etc.

Any Ideas?

patrik08
27th March 2008, 15:10
I am trying to draw widgets of fixed size regardless of screen size, resolution, etc.

For example, I want a button of size 22 millimeters x 18 millimeters on all screens, no matter the resolution etc.

Any Ideas?

Read this...
http://www.qtcentre.org/forum/f-qt-programming-2/t-working-with-coordinates-qgraphicssceneview-12693.html

Or make your own math

Screen Res: 1024x768, Diagonal Size: 19", Pixel size: 0.377mm
* Screen Res: 800x600, Diagonal Size: 17", Pixel size: 0.4318mm
* Screen Res: 640x480, Diagonal Size: 15", Pixel size: 0.4763mm
Algorythm for calculating 0.377mm pixel from 1024x768 19 inch screen" ???
http://en.wikipedia.org/wiki/Pixel