<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Matthieu, you made my day!!!<br>
I did read up on QDirIterator but clearly didn't see the woods for
the trees.<br>
<br>
Thanks!!<br>
<br>
frank<br>
<br>
<div class="moz-cite-prefix">On 10/03/16 10:50 pm, Matthieu Cadet
wrote:<br>
</div>
<blockquote
cite="mid:CAAJUXrWcOSor74MDzoxxM6RRAoU7FuiEEaior7sbr+9Sak4zig@mail.gmail.com"
type="cite">
<div dir="ltr">It seems that the problem come from your while
block,
<div>I get the same bug, but if you put it.next() before
.fileInfo(),</div>
<div>it works ;)</div>
<div><br>
</div>
<div>
<div>while it.hasNext():</div>
<div> it.next()</div>
<div> info = it.fileInfo()</div>
</div>
<div><br>
</div>
<div>According to the Qt documentation "After construction, the
iterator is located before the first directory entry. Here's
how to iterate over all the entries sequentially:"</div>
<div><br>
</div>
<div><span class=""
style="border-collapse:separate;color:rgb(49,49,49);font-family:Arial,Helvetica;font-size:14px;line-height:16px;border-spacing:0px">
<pre class="" style="border-radius:7px;border:1px solid rgb(230,230,230);border-collapse:separate;font-size:12px;line-height:1.2;margin-bottom:25px;margin-left:15px;overflow:hidden;padding:20px 0px;background-color:rgb(246,246,246)"><span class="" style="color:rgb(128,128,128)">QDirIterator</span> it(<span class="">"/etc"</span><span class="">,</span> <span class="" style="color:rgb(128,128,128)">QDirIterator</span><span class="">::</span>Subdirectories);
<span class="">while</span> (it<span class="">.</span>hasNext()) {
<a moz-do-not-send="true" href="qthelp://com.trolltech.qt.485/qdoc/qtglobal.html#qDebug" style="color:rgb(44,65,141);text-decoration:none">qDebug</a>() <span class=""><</span><span class=""><</span> it<span class="">.</span>next();
<span class="">// /etc/.</span>
<span class="">// /etc/..</span>
<span class="">// /etc/X11</span>
<span class="">// /etc/X11/fs</span>
<span class="">// ...</span>
}</pre>
</span></div>
<div class="gmail_extra">Hope this will works for you too ;)<br>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">On Thu, Mar 10, 2016 at 5:15 AM,
Frank Rueter | OHUfx <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:frank@ohufx.com"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:frank@ohufx.com">frank@ohufx.com</a></a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hi guys,<br>
<br>
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:<br>
pyside-rc refuses to compile an image file with a
certain name and I don't know why.<br>
Here is the simple test case that reproduces the issue
(all required files are in the attached zip file):<br>
<br>
I have a few icons like this:<br>
../sandbox/resourceTest/icons/other.svg<br>
../sandbox/resourceTest/icons/particles.svg<br>
../sandbox/resourceTest/icons/presets.svg<br>
<br>
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:<br>
<RCC><br>
<qresource><br>
<file>icons/other.svg</file><br>
<file>icons/particles.svg</file><br>
<file>icons/presets.svg</file><br>
</qresource><br>
</RCC><br>
<br>
I then compile the resource file with this command line:<br>
pyside-rcc -o resources.py resources.qrc<br>
<br>
To test the contents of the resource file I run the
following test code ("qiteratorTest.py" in the zip):<br>
<br>
from PySide import QtCore<br>
import sys<br>
import resources<br>
<br>
it =
QtCore.QDirIterator(':/icons',filter=QtCore.QDir.Files,
flags=QtCore.QDirIterator.Subdirectories)<br>
while it.hasNext():<br>
info = it.fileInfo()<br>
print '{} exists: {}'.format(info.baseName(),
info.exists())<br>
it.next()<br>
<br>
The result is this:<br>
<blockquote> exists: False<br>
presets exists: True<br>
other exists: True<br>
</blockquote>
No matter what I do, I cannot get pyside to compile the
file called "particles.svg".<br>
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.<br>
<br>
I have been struggling with this problem for ages now.
If anybody has any ideas, I would be very, very
grateful!<br>
<br>
Cheers,<br>
frank<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<div>-- <br>
<table style="width:524px;height:58px" border="0">
<tbody>
<tr>
<td style="text-align:center"><a
moz-do-not-send="true"
href="http://www.ohufx.com"
target="_blank"><img
src="cid:part3.02030403.00090900@ohufx.com"
alt="ohufxLogo 50x50"></a></td>
<td style="text-align:center"><strong><span
style="font-size:10pt"><a
moz-do-not-send="true"
href="http://ohufx.com/index.php/vfx-compositing"
target="_blank">vfx compositing</a></span>
| <span style="font-size:10pt"><strong><a
moz-do-not-send="true"
href="http://ohufx.com/index.php/vfx-customising"
target="_blank">workflow
customisation and consulting</a></strong>
</span> </strong></td>
</tr>
</tbody>
</table>
</div>
</font></span></div>
<br>
_______________________________________________<br>
PySide mailing list<br>
<a moz-do-not-send="true"
href="mailto:PySide@qt-project.org">PySide@qt-project.org</a><br>
<a moz-do-not-send="true"
href="http://lists.qt-project.org/mailman/listinfo/pyside"
rel="noreferrer" target="_blank">http://lists.qt-project.org/mailman/listinfo/pyside</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">Matthieu Cadet<br>
Compositor Artist & TD,
<div>nWave Digital<br>
<a moz-do-not-send="true"
href="mailto:matthieu.cadet@gmail.com" target="_blank">matthieu.cadet@gmail.com</a></div>
</div>
</div>
</div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<table style="width: 524px; height: 58px;" border="0">
<tbody>
<tr>
<td style="text-align: center;"><a
href="http://www.ohufx.com"><img
src="cid:part10.07030603.04070608@ohufx.com"
alt="ohufxLogo 50x50"></a></td>
<td style="text-align: center;"><strong><span
style="font-size: 10pt;"><a
href="http://ohufx.com/index.php/vfx-compositing">vfx
compositing</a></span> | <span style="font-size:
10pt;"><strong><a
href="http://ohufx.com/index.php/vfx-customising">workflow
customisation and consulting</a></strong> </span>
</strong></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>