Qt for Symbian - Touch / non-touch device discovery

I port a game for Symbian that supports both touch and non-touch interfaces.

I need to find out if the device has a touch screen at startup, so I can enable the corresponding mode.

After searching Google and Qt Docs many times, I found QSysInfo, but it just provides a Symbian device version.

Is there a way to get the real capabilities of the device? There must be a way to find out if the device has a touch screen ...!

I am using the latest QtCreator with NokiaSDK.

Thanks in advance, Nikos.

+3
source share
1 answer

I found the answer:

QSystemDeviceInfo cSystemInfo;

bool HasTouchScreen()
{
    DWORD dwFlags = cSystemInfo.inputMethodType();

    if ((dwFlags & (QSystemDeviceInfo::SingleTouch|QSystemDeviceInfo::MultiTouch)) != 0)
        return true;

    return false;
}
+4
source

Source: https://habr.com/ru/post/1781423/


All Articles