How to use https url to load an image in qml?
-
hi,
every body
I need to load an image by a url like this:"https://d2f9uwgpmber13.cloudfront.net/public/image_new/26fe75871805b8fa8ffcd1a94778be4c?.jpeg"
from a randomly chosen website
in my pc it works very well but in laptop don't work and returns this error:
"QML Image: TLS initialization failed"
what is the problem?```
Image {
id: name
anchors.top: flag.bottom
width: parent.width
height: parent.height-flag.heightsource: "https://d2f9uwgpmber13.cloudfront.net/public/image_new/26fe75871805b8fa8ffcd1a94778be4c?.jpeg" }
-
It may be SSL issue on your laptop. Issue is not from Qt framework.
-
@zzzzxx - last time I had this problem, I'm pretty sure I solved it by installing OpenSSL. Also, make sure your device/laptop/phone has internet connection.
I have a 10 year old Lenovo 64bit laptop. To be sure, I downloaded and installed both 32bit and 64bit OpenSSL;
https://slproweb.com/products/Win32OpenSSL.html
For me, to get the new image looking right; I made a few minor adjustments;
Image { id: name fillMode: Image.PreserveAspectFit anchors.fill: parent source: "https://d2f9uwgpmber13.cloudfront.net/public/image_new/26fe75871805b8fa8ffcd1a94778be4c?.jpeg" }