Thanks for the update Dee. Good to know what's causing this. For what it's
worth, I was seeing it on Fedora 10 and 15, so it's definitely not a
platform-specific issue.
Has anyone tested this using PySide in 6.3v5? I've been too busy to try it
myself just yet, but I have a feeling it may no longer be an issue...
-Nathan
-----Original Message-----
From: Dee Guff
Sent: Tuesday, November 01, 2011 1:27 AM
To: Nuke Python discussion
Cc: Nuke Python discussion
Subject: Re: [Nuke-python] PyQt and open() vs exec_() vs show()
Hi Nathan, Hi list :)
I ran into this too, with PyQt under Nuke and Maya.
I *think* it's a windows only bug, what os did you use?
Anyway, it took me two days to track it: it's a segfault happening when the
slot receives an sip object argument.
The c++ object dies at the end of the slot w/o deref the python wrapper, and
when this wrapper gets garbage collected the segfault occurs...
I'm using a decorator on my slot too deal with this until the next version
of qt/sip/PyQt is usable...
Hope this can save you time!
Cheers,
Dee.
.
Envoyé de mon iPwned
Le 31 oct. 2011 à 17:46, Nathan Rusch <[email protected]> a écrit :
Try using `self.ui.connect(self.ui, SIGNAL("finished(int)"), lambda x:
self.finished())`, and redefining your finished method to remove its code
arg. I just ran into a situation like this where .show() + a non-lambda
slot method connected to 'finished' caused PyQt to crash silently under
6.3+, and I'm curious if it's just something with my configuration.
-Nathan
-----Original Message----- From: Josh Imbruglia
Sent: Monday, October 31, 2011 6:17 AM
To: Nuke Python discussion
Subject: [Nuke-python] PyQt and open() vs exec_() vs show()
hi everybody,
I'm having trouble getting anything other then exec_ working to open
my PyQt dialogs under nuke 6.3. I want to make a dialog non-modal but
whenever i use show() to display the dialog none of my connections are
setup. Has anyone else experienced this or found a workaround?
a brief excerpt of my code is:
class pyQt_myDialog(object):
def __init__(self):
self.ui = uic.loadUi('myDialog.ui')
self.ui.connect(self.ui, SIGNAL("finished(int)"), self.finished)
def finished(self, code):
sys.stderr.write('we are finished %s\n' % str(code))
if i use exec_() to run it i get the printed statement, with open() or
show() nothing gets printed on closing the window. the ui gets loaded
correctly with the loadUi command.
any help or ideas on making a non-modal pyqt window in nuke6.3 would
be oh so helpful.
thanks!
Josh
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python