QML Window.with in android
Solved
Mobile and Embedded
-
Hello,
in my qml application I use window.with to determine the window resolution. On my linux pc I will get the correct value, but on an android device I will get 0 for width.
Do you know how can I get the window resolution in qml?Thank you for your help
BR
martin -
Hello,
in my qml application I use window.with to determine the window resolution. On my linux pc I will get the correct value, but on an android device I will get 0 for width.
Do you know how can I get the window resolution in qml?Thank you for your help
BR
martinhi @msauer75
Screen
should help youimport QtQuick.Window 2.13 ... ... Component.onCompleted:{ console.log(Screen.desktopAvailableHeight, Screen.desktopAvailableWidth, Screen.devicePixelRatio, Screen.pixelDensity) }
Reference:
https://doc.qt.io/qt-5/qml-qtquick-window-screen.html