[Interest] remote backgound-image in stylesheet
Elvis Stansvik
elvstone at gmail.com
Sun Sep 20 12:00:25 CEST 2015
Hi Amadeo,
2015-09-20 11:44 GMT+02:00 Amedeo Sorpreso <amedeo at sorpreso.it>:
> Ciao!
>
> I have a QWidget...
> ..can I set a remote image as his background image in the QWidget's
> stylesheet ?
> I tried:
>
> background-image:url('http://www.google.it/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png');
>
> but it don't works...
>From the documentation of url(...) [1]:
"filename is the name of a file on the local disk or stored using the
Qt Resource System. Setting an image implicitly sets the width and
height of the element."
So I'm afraid remote URLs are not allowed, you'll have to download the
image first.
Elvis
[1] http://doc.qt.io/qt-5/stylesheet-reference.html#url
>
> -- Amedeo
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
More information about the Interest
mailing list