[Qt-interest] QPixmap from URL

Ferenc Stelcz ferenc at stelcz.hu
Sat Jan 31 18:31:29 CET 2009


Andreas Diehl wrote:
> Hello all.
> 
> I've got a QLabel which should display a QPixmap. Loading the pixmap from a local path works fine, but using a web address doesn't do. Here's my code (using Qt 4.4.3 and QtJambi):
> 
Hello Andreas!

Maybe QPixmap-s can't be constructed from web URLs.
In _theory_ I would try to create a QTemporaryFile, then get the
contents of the image at the URL into it (with QHttp's get() method)
then pass this temp file to a QPixmap ctor. In theory... :)

/replied to the wrong address../



More information about the Qt-interest-old mailing list