Mridul Kumar Sr.
Mridul Kumar Sr.

Reputation: 25

QML Image not able to open local image files in iOS

I am trying to open the image files from iOS app local storage which were created using openCV. I have already tried to use file:/// also I used rootContextProperty. The app always says

 QML QQuickImage: Cannot open: file://users/amitimac/Library/Developer/CoreSimulator/Devices/C62DB1E2-F6AD-4A94-9E08-0DBA4E45E718/data/Containers/Data/Application/1FB67106-7647-4739-A59B-3D61EDF29718/Documents/Documents/test.png

But, I can both read and write to the local storage of the iOS simulator in C++, but not in QML.

I am using QStandardPaths :: writableLocation(QStandardPath :: DocumentsLocation) for writing the image files and I have also tried the Pictures location.

Please help if you can.

Upvotes: 0

Views: 175

Answers (1)

Mridul Kumar Sr.
Mridul Kumar Sr.

Reputation: 25

Well, I solved this issue. The actual problem was with the JPG files. When I converted them to PNG, the whole thing started to work.

Upvotes: 0

Related Questions