PDA

View Full Version : How to use a image from internet



kellen851105
4th March 2010, 05:35
For example, I want to set icon for each listwidgetitem, but the icon is located at http://www.test.com/test.jpg , how can I use this image?
Can I put the image url in qrc file and use :imagename to access it? or Can I use QIcon icon(" http://www.test.com/test.jpg ") ?

aamer4yu
4th March 2010, 06:16
You will need to download the image first and then set it as an icon.
To download , see QNetworkAccessManager::get