[SailfishDevel] Can't use QDeviceInfo

Kimmo Lindholm Kimmo.Lindholm at eke.fi
Wed Sep 16 20:48:26 UTC 2015


do you have such in your .pro

CONFIG += link_pkgconfig
PKGCONFIG += Qt5SystemInfo

?

-kimmo

________________________________________
Lähettäjä: devel-bounces at lists.sailfishos.org [devel-bounces at lists.sailfishos.org] käyttäjän tw_bolek [tw_bolek at op.pl] puolesta
Lähetetty: 16. syyskuuta 2015 23:41
Vastaanottaja: devel at lists.sailfishos.org
Aihe: [SailfishDevel] Can't use QDeviceInfo

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
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org


More information about the Devel mailing list