【发布时间】:2017-08-10 16:07:28
【问题描述】:
我正在尝试使用 Qt 打开 ios 图库,我发现了很多文章和答案。我测试了它们,但它们在 ios(10) 中不起作用 这里有两个不适合我的链接
Link 1 : Open ios gallery with FileDialog{}
Link 2 : Mixing Objective-c with Qt to access gallery in ios
第一个链接解释了如何使用 FileDialog 打开画廊,根据链接和它的描述:
在 iOS 中,只需在 QML 文件中创建一个 FileDialog 并设置文件夹: 快捷方式.图片。它将调用 iOS 库。
。下面是我的代码,但它不起作用!
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.0
ApplicationWindow {
visible: true
width: 640
height: 480
FileDialog {
id: fileDialog
visible: true
folder: shortcuts.pictures
}
}
第二个链接,我无法编译它,我得到了这个错误
ld: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a(arclite.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld Debug-iphonesimulator/QuickIOSExample.app/QuickIOSExample normal x86_64
(1 failure)
make: *** [xcodebuild-debug-simulator] Error 65
14:05:48: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project quickiosexample (kit: iphonesimulator-clang Qt 5.8.0 for iOS)
When executing step "Make"
谢谢你的回答:)
【问题讨论】:
标签: ios objective-c qt qml gallery