[Interest] Pyside - image file with certain file name won't compile via pyside-rcc
Frank Rueter | OHUfx
frank at ohufx.com
Thu Mar 10 21:47:52 CET 2016
Turns out I need to run it.next() first within the while block. I hadn't
picked up on that in the docs for QDirIterator.
Thanks,
frank
On 10/03/16 9:06 pm, Frank Rueter | OHUfx wrote:
> Hi guys, I posted this to the PySide mailing list as well as I'm
> getting a bit desperate, so to anybody who has already seen this:
> sorry for the double post!
>
> This is with PySide 1.2.1 and Qt 4.8.5:
>
> I have been seeing this issue for ages now and finally decided to try
> and fix it, however, even after writing a tiny little test case I
> still cannot get to the bottom of this, so I am hoping you guys can help:
> pyside-rc refuses to compile an image file with a certain name and I
> don't know why.
> Here is the simple test case that reproduces the issue (all required
> files are in the attached zip file):
>
> I have a few icons like this:
> ../sandbox/resourceTest/icons/other.svg
> ../sandbox/resourceTest/icons/particles.svg
> ../sandbox/resourceTest/icons/presets.svg
>
> I need to compile these icons into a resource module, so I have
> created a resource.qrc file on the same level as the "icons" directory
> which looks like this:
> <RCC>
> <qresource>
> <file>icons/other.svg</file>
> <file>icons/particles.svg</file>
> <file>icons/presets.svg</file>
> </qresource>
> </RCC>
>
> I then compile the resource file with this command line:
> pyside-rcc -o resources.py resources.qrc
>
> To test the contents of the resource file I run the following test
> code ("qiteratorTest.py" in the zip):
>
> from PySide import QtCore
> import sys
> import resources
>
> it = QtCore.QDirIterator(':/icons',filter=QtCore.QDir.Files,
> flags=QtCore.QDirIterator.Subdirectories)
> while it.hasNext():
> info = it.fileInfo()
> print '{} exists: {}'.format(info.baseName(), info.exists())
> it.next()
>
> The result is this:
>
> exists: False
> presets exists: True
> other exists: True
>
> No matter what I do, I cannot get pyside to compile the file called
> "particles.svg".
> To make matters more interesting, I duplicated the same file and
> renamed it to the above file names ("other.svg", "particles.svg" and
> "presets.svg"). But I still get the same result, so it's clearly not
> related to the file itself, but it's name.
>
> I have been struggling with this problem for ages now. If anybody has
> any ideas, I would be very, very grateful!
>
> Cheers,
> frank
>
>
> --
> ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing
> <http://ohufx.com/index.php/vfx-compositing> | *workflow customisation
> and consulting <http://ohufx.com/index.php/vfx-customising>* *
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
--
ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing
<http://ohufx.com/index.php/vfx-compositing> | *workflow customisation
and consulting <http://ohufx.com/index.php/vfx-customising>* *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160311/f1253de1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 2666 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160311/f1253de1/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ohufxLogo_50x50.png
Type: image/png
Size: 2666 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160311/f1253de1/attachment-0001.png>
More information about the Interest
mailing list