Maya 2018.2: windows created with Qt not popping up

43 views
Skip to first unread message

Tom Whitzer

unread,
Jan 20, 2018, 10:06:46 PM1/20/18
to Python Programming for Autodesk Maya


Hey Everyone,

I am not sure if the syntax for working with Qt in Maya has changed. My scripts for creating windows in Maya are no longer functioning correctly. When I try to create a simple window using Qt in Maya nothing pops up. I can see that the object is being created in memory, though. 

Quick test code to create a window that worked for me in the past. 


from Qt import QtWidgets

tempWindow = QtWidgets.QDialog()
tempWindow.setWindowTitle("Temp Window")

Justin Israel

unread,
Jan 21, 2018, 12:13:36 AM1/21/18
to python_in...@googlegroups.com
Do you have a more complete example of what you are trying? This wouldn't be enough to see anything. 

--
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/9bb677cb-1229-4bf2-8360-7a9136457241%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tom Whitzer

unread,
Jan 21, 2018, 1:01:54 AM1/21/18
to python_in...@googlegroups.com
My bad, here is a link to a script that was working for me before.


On Sun, Jan 21, 2018 at 12:13 AM, Justin Israel <justin...@gmail.com> wrote:


On Sun, Jan 21, 2018, 4:06 PM Tom Whitzer <tjwh...@gmail.com> wrote:


Hey Everyone,

I am not sure if the syntax for working with Qt in Maya has changed. My scripts for creating windows in Maya are no longer functioning correctly. When I try to create a simple window using Qt in Maya nothing pops up. I can see that the object is being created in memory, though. 

Quick test code to create a window that worked for me in the past. 


from Qt import QtWidgets

tempWindow = QtWidgets.QDialog()
tempWindow.setWindowTitle("Temp Window")

Do you have a more complete example of what you are trying? This wouldn't be enough to see anything. 

--
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_maya+unsub...@googlegroups.com.

--
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_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3L25vQygwsDM3_4KdDXNPCYqafVi0Mz4WmUZLvENr%3DqA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
------------------------------------
Tom Whitzer

Justin Israel

unread,
Jan 21, 2018, 1:05:19 AM1/21/18
to python_in...@googlegroups.com


On Sun, Jan 21, 2018, 7:01 PM Tom Whitzer <tjwh...@gmail.com> wrote:
My bad, here is a link to a script that was working for me before.



So do you ever call show()  on this widget in the example of how you use it? 

Also your script has a typo when calling deleteUI:



On Sun, Jan 21, 2018 at 12:13 AM, Justin Israel <justin...@gmail.com> wrote:


On Sun, Jan 21, 2018, 4:06 PM Tom Whitzer <tjwh...@gmail.com> wrote:


Hey Everyone,

I am not sure if the syntax for working with Qt in Maya has changed. My scripts for creating windows in Maya are no longer functioning correctly. When I try to create a simple window using Qt in Maya nothing pops up. I can see that the object is being created in memory, though. 

Quick test code to create a window that worked for me in the past. 


from Qt import QtWidgets

tempWindow = QtWidgets.QDialog()
tempWindow.setWindowTitle("Temp Window")

Do you have a more complete example of what you are trying? This wouldn't be enough to see anything. 

--
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.

--
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.
--
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/CAKGAQ_CGXjYJWZoteDi%3DdTAePw2LiWwhs6Ap%2BuV0GwinFYQm5w%40mail.gmail.com.

Tom Whitzer

unread,
Jan 21, 2018, 1:10:12 AM1/21/18
to python_in...@googlegroups.com
I was doing quick tests with it as I was figuring out the look for the window. I would call show() in Maya's script editor

import Hand_Rig_UI as hr

a = hr.HandRig()
a.show()

------------------------------------------------
Tom Whitzer
https://www.tomwhitzer.com

On Jan 21, 2018 1:05 AM, "Justin Israel" <justin...@gmail.com> wrote:


On Sun, Jan 21, 2018, 7:01 PM Tom Whitzer <tjwh...@gmail.com> wrote:
My bad, here is a link to a script that was working for me before.



So do you ever call show()  on this widget in the example of how you use it? 

Also your script has a typo when calling deleteUI:



On Sun, Jan 21, 2018 at 12:13 AM, Justin Israel <justin...@gmail.com> wrote:


On Sun, Jan 21, 2018, 4:06 PM Tom Whitzer <tjwh...@gmail.com> wrote:


Hey Everyone,

I am not sure if the syntax for working with Qt in Maya has changed. My scripts for creating windows in Maya are no longer functioning correctly. When I try to create a simple window using Qt in Maya nothing pops up. I can see that the object is being created in memory, though. 

Quick test code to create a window that worked for me in the past. 


from Qt import QtWidgets

tempWindow = QtWidgets.QDialog()
tempWindow.setWindowTitle("Temp Window")

Do you have a more complete example of what you are trying? This wouldn't be enough to see anything. 

--
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_maya+unsub...@googlegroups.com.

--
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_maya+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
------------------------------------
Tom Whitzer

--
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_maya+unsub...@googlegroups.com.

--
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_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2%2BXwgMZ8FUVFYRY7JXUZytrWk5GaCsPf-pHcf5MEWNwA%40mail.gmail.com.

Justin Israel

unread,
Jan 21, 2018, 1:37:31 AM1/21/18
to python_in...@googlegroups.com


On Sun, Jan 21, 2018, 7:10 PM Tom Whitzer <tjwh...@gmail.com> wrote:
I was doing quick tests with it as I was figuring out the look for the window. I would call show() in Maya's script editor

import Hand_Rig_UI as hr

a = hr.HandRig()
a.show()

It's not parented to anything. Have you tried called raise_() on the widget and ensuring it has a reasonable initial size? 

Based on your script and usage, I would expect the widget to be created and shown, but potentially hidden behind other windows or sized small. 


------------------------------------------------
Tom Whitzer
https://www.tomwhitzer.com

On Jan 21, 2018 1:05 AM, "Justin Israel" <justin...@gmail.com> wrote:


On Sun, Jan 21, 2018, 7:01 PM Tom Whitzer <tjwh...@gmail.com> wrote:
My bad, here is a link to a script that was working for me before.



So do you ever call show()  on this widget in the example of how you use it? 

Also your script has a typo when calling deleteUI:



On Sun, Jan 21, 2018 at 12:13 AM, Justin Israel <justin...@gmail.com> wrote:


On Sun, Jan 21, 2018, 4:06 PM Tom Whitzer <tjwh...@gmail.com> wrote:


Hey Everyone,

I am not sure if the syntax for working with Qt in Maya has changed. My scripts for creating windows in Maya are no longer functioning correctly. When I try to create a simple window using Qt in Maya nothing pops up. I can see that the object is being created in memory, though. 

Quick test code to create a window that worked for me in the past. 


from Qt import QtWidgets

tempWindow = QtWidgets.QDialog()
tempWindow.setWindowTitle("Temp Window")

Do you have a more complete example of what you are trying? This wouldn't be enough to see anything. 

--
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.

--
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.

For more options, visit https://groups.google.com/d/optout.



--
------------------------------------
Tom Whitzer

--
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.

--
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.
--
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/CAKGAQ_DjjA9V%3Dn5WGtHRc%3DfCd20HEOb5OTH84YLyscusYzTR8A%40mail.gmail.com.

Tom Whitzer

unread,
Jan 21, 2018, 10:26:24 AM1/21/18
to python_in...@googlegroups.com
Thank you Justin, I will try that! It is odd, because before it was working fine, but i guess it was just luck. 


------------------------------------------------
Tom Whitzer
https://www.tomwhitzer.com
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
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_maya+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
------------------------------------
Tom Whitzer

--
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_maya+unsub...@googlegroups.com.

--
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_maya+unsub...@googlegroups.com.

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 python_inside_maya+unsub...@googlegroups.com.

--
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_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1tqmbkE3%3D_077Wcne-%3DYtmBijsH7dOBRO9C-fHeqHTDQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages