Archived:Get network and operator name in Qt on Symbian
S60 5th Edition
This code snippets shows how to get Network name and Operator name.
This snippet requires ReadDeviceData capabilities. Self-signing is not possible because a Developer certificate is needed.
- Install Qt for S60:Installing Qt on S60
- Download ExtXQSysInfo2.zip.
- Extracting ExtXQSysInfo2.zip and place all the file in your project directory.
- Edit your .pro file as mentioned below.
Note: These files are extended from source file of XQSysInfo API. More clearly , i have just edited some file of XQSysInfo API to get Network name and Operator name. XQSysInfo::network() gives network name and XQSysInfo::operatorName() gives operator name.
All source files are automatically added to .pro file by carbide, so need to add the libraries and capability only.
symbian:LIBS += -letel3rdparty \
symbian:TARGET.CAPABILITY = ReadDeviceData
XQSysInfo* sysInfo = new XQSysInfo(this);
/* show network name on label */
ui.label->setText("Network Name: " + sysInfo->network());
/* show operator name on label */
ui.label_2->setText("Operator Name: " + sysInfo->operatorName());
The code snippet is expected to show Network name and Operator name on screen as showm bellow.
Download Code Example
- The Code Example will show network name and operator name on screen and is tested on Nokia 5800 XpressMusic.