Nikos
Nikos

Reputation: 787

Qt for Symbian - Detecting touch/non-touch devices

I'm porting a game for Symbian which supports both a touch & non-touch UI.

I need to be able to tell if the device has a touch screen on start-up so I can enable the appropriate mode.

After googling for hours and going though the Qt Docs I found QSysInfo but this merely provides the version of the Symbian device.

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

I'm using the latest QtCreator with the NokiaSDK.

Thank you in advance, Nikos.

Upvotes: 3

Views: 699

Answers (1)

Nikos
Nikos

Reputation: 787

I found the answer:

QSystemDeviceInfo cSystemInfo;

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

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

    return false;
}

Upvotes: 4

Related Questions