← Back to team overview

ubuntu-phone team mailing list archive

Re: Find out if running on a phone

 



On 11/01/16 13:58, Michi Henning wrote:

Right... forgot that it's a gerrit MR, not Launchpad:

https://codereview.qt-project.org/#/c/101049/

Thanks for that!

I just had a look at
https://codereview.qt-project.org/#/c/101049/15/src/systeminfo/qinputinfo.h

But this requires an input to then find out what the source was (mouse,
touch screen, etc.).

It does not need an event first. QInputInfoManager::deviceMap() will give a list of devices. You can filter these by setting a filter first.


I need to know whether I’m running on touch or on the desktop, without
any input events.

Any other ideas? Is there some place in the filesystem I could look at,
or test some env var or whatever?
It has to work under confinement though.

Thanks,

Michi.




Follow ups

References