Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Qml Canvas loadImage not working

$
0
0
I have a Qt Quick app that is trying to load an image (from a local drive) into a Canvas element. canvas.loadImage("C:\Users\John_T\Desktop\paint.png") And then:  onImageLoaded:     {         if(canvas.isImageError("C:\Users\John_T\Desktop\paint.png"))         console.log("Image failed to load!")           var contex = getContext('2d')         contex.drawImage("C:\Users\John_T\Desktop\paint.png", 0, 0)         canvas.requestPaint()     } It doesn’t work and I get this output: *QSslSocket: cannot resolve TLSv1_1_client_method QSslSocket: cannot resolve TLSv1_2_client_method QSslSocket: cannot resolve TLSv1_1_server_method QSslSocket: cannot resolve TLSv1_2_server_method QSslSocket: cannot resolve SSL_select_next_proto QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb QSslSocket: cannot resolve SSL_get0_next_proto_negotiated qml: Image failed to load* Any ideas?

Viewing all articles
Browse latest Browse all 4972

Trending Articles