Getting screen information in both desktop and mobile



  • Hi to all,

    In the recent Qt-Quick components (released starting from Qt 4.7.3) there is the QML screen element. Instead the other components i.e. the common toolbar this seems to be usable only on symbian devices. Is there some class or method or some other else to get the current screen size, pixel density, resolution etc while working on desktop applications?

    P.S. it is obvious that in the case of the desktop one of the elements that can be used instead the screen element should be the current main window size, but it is a bit different because the screen element includes information about density, device class etc.

    Many thanks.



  • AFAIK: QApplication::desktop() is the only class related to that, for pixel density info you may try using some OS functions.



  • Many thanks! I think that this is sufficient.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.