Im currently developing my first application in PyQt4, and what i would like to do now is to set my application’s window icon from an image source on a website.
I thought something like this would work, but that is not the case:
self.
# Sets the application icon
def set_app_icon(self, icon_url):
self.setWindowIcon(QIcon(QUrl(icon_url)))
self.set_app_icon('http://web.page/icon.png')
How can i achieve this? Thank you in advance.
QIconcannot go and fetch data from web. You need to download it yourself and give it toQIcon. Something like this: