首页| 论坛| 消息

标题:qt for symbian--如何调s60拨打电话的接口
作者:biao_vip
日期:2011-11-17 15:47
内容:

最近做个功能
涉及调用symbian S60 拨号的功能
资料少 求高手指导啊 多谢!!!


#1 [biao_vip 11-24 09:39]
已解决!
#2 回 楼主(biao_vip) 的帖子 [cp790621656 11-24 10:07]
请问如何解决?
#3 回 2楼(cp790621656) 的帖子 [biao_vip 12-01 15:59]
两种方法(qt sdk 都包含了这些文件,不是第三方库):
1. 声明etel3rdparty.h;
pro文件中添加symbian:LIBS += -letel3rdparty \;
调用接口:
const char* aString = LabPhone->text().toAscii().data();//获取电话号码
#ifdef Q_OS_SYMBIAN
TBuf aDescriptor;
stringToDescriptor(aString, aDescriptor);//转symbian描述符
iCallDialer = CCallDialer::NewL(*this, aDescriptor);
#endif
2.etel.h
…………
#4 [biao_vip 12-01 16:16]
ps:

#ifdef Q_OS_SYMBIAN
void stringToDescriptor(const char* aString, TDes& aDescriptor)
{
if(strlen(aString) > 0)
{
TPtrC8 ptr(reinterpret_cast(aString));
aDescriptor.Copy(ptr);
}
else
aDescriptor.Copy(_L(""));
}
#endif
#5 回 楼主(biao_vip) 的帖子 [foxgod 11-27 19:11]
你的源代码可以接我看看嘛,对这个地方还不是很了解,网络打电话的

<< 1 2 >> (1/2)

回复 发表
主题 版块