Maya 2012 freezing after running pyqt gui

75 views
Skip to first unread message

Panupat Chongstitwattana

unread,
Dec 6, 2011, 5:44:18 AM12/6/11
to python_in...@googlegroups.com
Hi.

I'm following example from a book "Rapid GUI Programming with Python and Qt"

http://www.qtrac.eu/pyqtbook.html

I am on chapter 4 where it shows a little calculator script with gui.

Running the pyw on windows, and copy paste the script into 2010, the
script works fine with nothing wrong

On Maya 2012 tho it freezes Maya. The calcualtor itself does work, I
can move it around and do calculations. I don't understand what is it
doing that freezes Maya. Can anyone help look at the code?

The code can be downloaded here, it's in chapter 4 called calculator.pyw
http://www.qtrac.eu/pyqtbook26.zip

Best regard,
Panupat C.

David Moulder

unread,
Dec 6, 2011, 7:14:39 AM12/6/11
to python_in...@googlegroups.com
It will be the app.exec_() call.

There can only be one qApp and Maya is now built with QT.  This is why it works in 2010 and not in 2011 and up.

In fact.  You only have 1 qApp even if 2 versions of QT maya's are up and running.

just do:-

form = Form()
form.show()


for more useful stuff!


Panupat Chongstitwattana

unread,
Dec 6, 2011, 10:00:56 AM12/6/11
to python_in...@googlegroups.com
Oh. Thanks David. I doubt I'll ever figure that one out on my own.

Best regard,
Panupat C.

Message has been deleted

Justin Israel

unread,
Nov 23, 2014, 12:42:21 AM11/23/14
to python_in...@googlegroups.com
Nathan wasn't on this thread. David linked to a website ;-)
Do you have a small reproducible example of your issue?

On Sun, 23 Nov 2014 4:49 PM johnkra <jmal...@gmail.com> wrote:
Hi Nathan,

I've dug this post up from a google search :)

I tried this Panupat's calculator script and your suggestion out, however Maya still locks me out of the primary window. I'm a newb on QT related things and was hoping you could help!

Best,
John
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/4a38be1b-7900-4751-84b7-42ffed51e546%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages