abhishek
abhishek

Reputation: 857

How to set QIcon from an Url in Qt

I want to set my QIcon from an url which I am passing it as a string, but still it is not showing me any image, is there any other way to do it.

Upvotes: 0

Views: 1441

Answers (1)

Kunal
Kunal

Reputation: 3535

You need to use QNetworkAccessManager to download image uring QUrl. You can use QImageReader to load image data to QImage.

Here is nice example to demostrate this.

Upvotes: 3

Related Questions