[SailfishDevel] Can't use QDeviceInfo

tw_bolek tw_bolek at op.pl
Wed Sep 16 20:41:44 UTC 2015


Guys, PLEASE, help me, or soon I'll go nuts.

For days I've been struggling to use QtSystemInfo/QDeviceInfo to get IMEI. I need to do it in C++, not in QML.

It is properly imported (e.g. #include <QtSystemInfo/QtSystemInfo>), QtCreator recognizes it, but every time I try to build the project I end up with "undefined reference to `QDeviceInfo::QDeviceInfo(QObject*)'" error.  I tried literally everything - no way to make the damn thing work!  

deviceInfo = new QDeviceInfo;   
always causes undefined reference to `QDeviceInfo::QDeviceInfo(QObject*)'

I'm totally fooled now. Can someone please just post an example code to make it work? Just what to add to the default main.cpp file....

Thank you very much in advance!
Bolek


More information about the Devel mailing list