Are you saying, based on your example, that it prints "A" and then crashes
right before the return statement? That seems strange. Can you reproduce
the crash against a standalone PyQt? This may seem weird but try collecting
the selected indexes into a variable first, and then operating on that
list. I have seen odd bugs related to PyQt memory management sometimes when
using the temporary output of a call, in a nested statement.

sel = self.ui.fileList.selectedIndexes()
if len(sel) < 1:
...

Does that crash? Also what type of widget is "fileList"? A QListWidget?
Sometimes calling protected methods on widgets can trigger the crash. You
might need to see if you should be called a public method instead.

On Sat, 14 Feb 2015 4:08 AM Marcus Ottosson <[email protected]> wrote:

> If you're on Windows, double check that their PyQt version was compiled
> for the right version of Maya and Visual Studio. Some things might work
> with the wrong version, but you may get unexpected crashes doing ordinary
> things if not; maybe this is what you're seeing?
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC4U8wuj4whbgR1%2BSnQCu4jRHEQ307iUTMa-Mbbc%2BNZ4g%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC4U8wuj4whbgR1%2BSnQCu4jRHEQ307iUTMa-Mbbc%2BNZ4g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0toRt%3Dnyb2zx6dDFFcx-6UCc%2BbefX0UihJVAyK%3DngMDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to