Re: How do you include the pyrcc5 -generated .py file into your app?

Luna Tuna <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <CABhCPevzKeTy9pcWgQ8ZpP9GaB=UgAo0JSxMGcMqZuVbdEd9dw@mail.gmail.com>
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 <[email protected]>
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
>

_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.