How to check the physical screen size of your display?
QML and Qt Quick
2
Posts
2
Posters
914
Views
1
Watching
-
wrote on 22 Dec 2014, 20:01 last edited by
Hi guys,
I have been using the Screen Qml component, but that one does not offer a way to tell me the physical screen size, only the display size in pixels.
The symbian Screen Component offers the "displayCategory":http://http://doc.qt.digia.com/qtquick-components-symbian-1.1/qml-screen.html, but symbian Components are not available for Qt 5.3, which I am actually using.
How would you address with this problem.
Thankssss
-
You can get it (although a bit unreliably) from QDesktopWidget, like this:
@
int heightMiliMeters = QDesktopWidget::screen()->heightMM();
int widthMiliMeters = QDesktopWidget::screen()->widthMM();
@
2/2