【问题标题】:loading Image from QUrl with blackberry 10使用黑莓 10 从 QUrl 加载图像
【发布时间】:2014-01-06 14:39:47
【问题描述】:
bb::cascades::Image m_image = Image(QUrl(appRoot +"default.png"));

如果文件不存在 m_image 返回什么??

【问题讨论】:

    标签: image blackberry-10 qurl


    【解决方案1】:

    它应该返回 null

    将图像与应用程序打包的好处之一是 它允许该工具验证图像并针对 他们瞄准的设备。因为它们是包装在 应用程序,应该假设它们是立即可用的, 并且永远不会加载失败。 如果提供的名称不正确 创建资产,返回空图像。

    Image documentation

    【讨论】:

      猜你喜欢
      • 2011-09-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多