| ID | ... | Creation date | June 24, 2009 |
| Platform | S60 3rd Edition, FP1, FP2 S60 5th Edition | Tested on devices | Nokia 5800 XpressMusic |
| Category | Qt for Symbian | Subcategory |
| Keywords (APIs, classes, methods, functions): ,XQSysInfo::model(),XQSysInfo::manufacturer(),XQSysInfo::softwareVersion() |
This code snippets shows how to get Model number, Manufacturer and Software Version of device in Qt. The XQSysInfo class provides information about the device. model() method of class XQSysInfo return Model number. manufacturer() method of class XQSysInfo return Manufacturer. softwareVersion() method of class XQSysInfo return Software Version.
This snippet requires ReadDeviceData capabilities. Self-signing is not possible because a Developer Certificate is needed.
#include <XQSysInfo>
symbian:LIBS += -letel3rdparty \
-lsysutil \
-lefsrv \
-lfeatdiscovery
symbian:TARGET.CAPABILITY = ReadDeviceData
XQSysInfo *sysInfo = new XQSysInfo(this);
/* show Model, Manufacturer and Software Version on labels*/
ui.label->setText("Model: " + sysInfo->model());
ui.label_2->setText("Manufacturer: " + sysInfo->manufacturer());
ui.label_3->setText("Software Version: " + sysInfo->softwareVersion());