如何在 QT 中获取电话信息? (运营商、设备型号、设备制造商)
我在网上找到了类似下面的内容
//Get S60 version and display it on label
switch (QSysInfo::s60Version ())
{
case QSysInfo::SV_S60_3_1: return "S60 version: S60 3.1";
case QSysInfo::SV_S60_3_2: return "S60 version: S60 3.2";
case QSysInfo::SV_S60_5_0: return "S60 version: S60 5.0";
case QSysInfo::SV_S60_Unknown: return "S60 version: S60 Unknown";
default:
break;
}
//Get OS version and display it on label
switch (QSysInfo::symbianVersion ())
{
case QSysInfo::QSysInfo::SV_9_2: return "Symbian OS version: 9.2";
case QSysInfo::SV_9_3: return "Symbian OS version: 9.3";
case QSysInfo::SV_9_4: return "Symbian OS version: 9.4";
case QSysInfo::SV_Unknown: return "Symbian OS version: Unknown";
default:
break;
}
,但这无法编译,因为 QSysInfo 类没有 s60Version 方法,也没有 symbian 版本 - 我只得到 windowsVersion...
I've found something like below on the net
//Get S60 version and display it on label
switch (QSysInfo::s60Version ())
{
case QSysInfo::SV_S60_3_1: return "S60 version: S60 3.1";
case QSysInfo::SV_S60_3_2: return "S60 version: S60 3.2";
case QSysInfo::SV_S60_5_0: return "S60 version: S60 5.0";
case QSysInfo::SV_S60_Unknown: return "S60 version: S60 Unknown";
default:
break;
}
//Get OS version and display it on label
switch (QSysInfo::symbianVersion ())
{
case QSysInfo::QSysInfo::SV_9_2: return "Symbian OS version: 9.2";
case QSysInfo::SV_9_3: return "Symbian OS version: 9.3";
case QSysInfo::SV_9_4: return "Symbian OS version: 9.4";
case QSysInfo::SV_Unknown: return "Symbian OS version: Unknown";
default:
break;
}
BUT this doesn't compile as the QSysInfo class doesn't have s60Version method nor the symbian Version - I only get windowsVersion...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,找到了 - 对于每个需要这些东西的人:
希望这对某人有帮助:)
干杯!
Ok, found it - for everybody that needs that stuff:
hope this helps someone :)
cheers!