Archived:Get network and operator name in Qt on Symbian
m (Qt for S60 to Qt for Symbian) |
|||
| Line 3: | Line 3: | ||
|platform=S60 3rd Edition, FP1, FP2<br>S60 5th Edition | |platform=S60 3rd Edition, FP1, FP2<br>S60 5th Edition | ||
|devices= Nokia 5800 XpressMusic | |devices= Nokia 5800 XpressMusic | ||
| − | |category=Qt for | + | |category=Qt for Symbian |
|subcategory= | |subcategory= | ||
|creationdate=June 26, 2009 | |creationdate=June 26, 2009 | ||
| Line 62: | Line 62: | ||
* The [[Media:QtNetworkOperator.zip|Code Example]] will show network name and operator name on screen and is tested on Nokia 5800 XpressMusic. | * The [[Media:QtNetworkOperator.zip|Code Example]] will show network name and operator name on screen and is tested on Nokia 5800 XpressMusic. | ||
| − | [[Category:Qt]][[Category:Qt for | + | [[Category:Qt]][[Category:Qt for Symbian]][[Category:Code Examples]] |
Revision as of 10:01, 3 September 2009
Article Metadata
Tested with
Devices(s): Nokia 5800 XpressMusic
Compatibility
Platform(s): S60 3rd Edition, FP1, FP2
S60 5th Edition
S60 5th Edition
Article
Keywords: XQSysInfo::network(), XQSysInfo::operatorName()
Created: (26 Jun 2009)
Last edited: croozeus
(03 Sep 2009)
Contents |
Overview
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.
Prerequisite
- 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.
Headers required
#include <XQSysInfo>.pro file
All source files are automatically added to .pro file by carbide, so need to add the libraries and capability only.
symbian:LIBS += -letel3rdparty \
-lsysutil \
-lefsrv \
-lfeatdiscovery
symbian:TARGET.CAPABILITY = ReadDeviceData
Source
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());
Postconditions
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.


