Mar*_*era 7 c++ qt symbian qml
我刚刚在使用此代码时发现了奇怪的行为
Qt.openUrlExternally(someurl);
Run Code Online (Sandbox Code Playgroud)
我想让我的用户打开facebook sharer url,但我无法使用此代码,因为它什么也没做.
在S60 5th和Symbian ^ 3设备(C5,C7,5230,N8)上测试
所以请告诉我(如果你知道的话)
1)这个组件/行为有什么问题吗?(我搜索并没有找到任何东西)
2)我怎样才能使C++组件做同样的事情?`(如果它是解决方案)
谢谢
编辑
我找到了使用QML可访问的方法创建C++组件的示例,请点击此处:http: //doc.qt.io/qt-4.8/qt-declarative-cppextensions-referenceexamples-methods-example.html
最终编辑
讨论导致制作错误报告,可在以下网址找到:https://bugreports.qt.io/browse/QTBUG-19201
谢谢大家
fun*_*bro 10
Qt.openUrlExternally("http://www.stackoverflow.com/");
为我打开本机浏览器.
我发现的唯一问题是,如果浏览器已经在手机上运行(在后台),它将不会被带到前台,因此看起来好像没有效果.
尝试将此添加到.pro文件中
# Needed for bringing browser from background to foreground using QDesktopServices: https://bugreports.qt.io/browse/QTBUG-8336
TARGET.CAPABILITY += SwEvent
Run Code Online (Sandbox Code Playgroud)
它应该将浏览器带到前台.