[PyQt] How do you include the pyrcc5 -generated .py file into your app?
Luna Tuna
fruitfulapproach at gmail.com
Sat May 4 22:33:05 BST 2019
Ok, thanks.
Tried that, also tried including from .qrc the .ico within Qt Creator, on
the main window. Doesn't work.
Also tried QIcon(":/images/app_icon.ico") trick and doesn't work. With or
without importing the pyrcc5 generated file.
The only thing that seems to work is QIcon("ui/images/app_icon.ico"), ie
direct from image file.
It might mean I have to include the icons in a folder next to EXE, but I'm
okay with that.
Any idea why the resource is not including though? I followed instructions
to the T.
On Sat, May 4, 2019 at 2:06 PM Phil Thompson <phil at riverbankcomputing.com>
wrote:
> On 04/05/2019 21:22, Luna Tuna wrote:
> > Hi,
> >
> > I googled and found an article on how to go from your resource.qrc file
> > produced in Qt Creator to your resource.py file produced by pyrcc5
> > command:
> >
> > pyrcc5 images_resource.qrc -o images_resource.py
> >
> >
> > So how now do I include this python file or call it, where do I call
> > its
> > methods, etc?
>
> Import it - there is nothing else to do.
>
> Phil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190504/1cff5992/attachment-0001.html>
More information about the PyQt
mailing list