PyQt6 and SIP v6 Snapshots Available

Patrick Stinson patrickkidd at gmail.com
Fri Sep 25 07:32:15 BST 2020


It’s hard not to hijack a particular question on this topic at this point. Nevertheless...

If there is no pyrcc6, then what is the intended plan for loading image paths from Qml in a manner that works both 1) when running Python from the terminal and 2) when running as a  statically linked exe with pyqdeploy?

> On Sep 24, 2020, at 7:17 AM, Phil Thompson <phil at riverbankcomputing.com> wrote:
> 
> On 24/09/2020 15:58, Maurizio Berti wrote:
>>> Il giorno mer 23 set 2020 alle ore 23:15 Phil Thompson <
>>> phil at riverbankcomputing.com> ha scritto:
>>>> On 23/09/2020 20:15, Patrick Stinson wrote:
>>> > Phil,
>>> >
>>> > Could you explain what makes the Qt resource system obsolete in a
>>> > PyQt6 context?
>>> https://www.riverbankcomputing.com/static/Docs/pyqtdeploy/pyrcc.html
>>> > The Qt resource system itself seems to play an
>>> > essential role in the toolkit. If you think it does not provide an
>>> > essential function, then I am intrigued to hear more.
>>> If there is something that you cannot do with existing Python techniques
>>> then I'll happily reconsider.
>> In my case, among other things (custom fonts, images) I mostly use pyrcc
>> for my own icon theme with about 500 icons, which allows me to use
>> QIcon.fromTheme('icon-name'), which I use it *a lot*: mostly because I find
>> it much simpler and easier to read than the full image path constructor,
>> but also because it allows to use the fall back mechanism (under Linux, at
>> least) if an icon is not in the selected theme, and finally to use
>> different icons according to the icon size.
>> Maybe I'm not aware of other ways to use the resource system, as I always
>> used pyrcc.
> 
> Why use the Qt resource system at all?
> 
>> If that won't be available, will setThemeSearchPaths work
>> anyway?
> 
> Of course. Nothing in Qt forces you to use a resource rather than a regular file.
> 
>> Will all other ":/" resource loading keep their functionalities
>> when using local relative paths (or importlib.resources)?
> 
> Sorry, I don't understand the question. Obviously Qt knows nothing about importlib.resources.
> 
> Phil


More information about the PyQt mailing list