QML Image object, unable to load file
Unsolved
QML and Qt Quick
-
Hi, I have a problem on load file with QML image object when the file path contains the special char #.
How can I resolve? I can't remove this special char from the path.
The error isQML Image: Cannot open: file:///Dati/Backup/Spartiti/AAA Leggio elettronico/Data/Cesi Mi+ Do#-/001.png
-
It probably won't work, but you can try escaping it with
\
. Or (better) - use QUrl::fromLocalFile() to get a properly escaped string. Or (biggest effort but will surely work) implement an ImageProvider which will read the file and provide it to your Image component. -
@mrdebug
since an url is expected my guess is that it must be escaped properly (#
=%23
)