共享调用有时为空

编程入门 行业动态 更新时间:2024-10-27 15:20:19
本文介绍了共享调用有时为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在使用共享调用时遇到了一个奇怪的错误.

I have a strange bug using a share invoke.

约有三分之一的尝试共享将导致没有文本被共享.通常,第一次共享将起作用,但进一步的尝试将不起作用.它将随机再次开始工作. BBM,Facebook和Twitter应用程序会发生这种情况.

About 1 in 3 attempts to share will result in no text being shared. Usually the first share will work but further attempts will not work. Randomly it will start working again. This happens with bbm, facebook and twitter apps.

以下代码是listview列表项的一部分.

The following code is part of a listview listitem.

InvokeActionItem { id: invokeActionItem title: "Share" ActionBar.placement: ActionBarPlacement.OnBar imageSource: "asset:///Images/Icons/share_icon.png" query { mimeType: "text/plain" invokeActionId: "bb.action.SHARE" } onTriggered: { query.data = "I just read this and had to share it: " + ListItemData.title + ". "; query.data += "Read it here " + ListItemData.shareUrl; query.updateQuery(); } }

有没有人知道可能是什么原因或如何解决此问题?

Has anyone got any ideas what could be causing the issue or how to solve it?

推荐答案

不幸的是,在QML中,调用已中断(有时仅适用于文本).您将需要使用C ++(在这里可以很好地工作)

Invocation is unfortunately broke in QML (works only for text sometimes). You will need to use C++ for it (it works well there)

更多推荐

共享调用有时为空

本文发布于:2023-10-11 17:50:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1482400.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:为空

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!