qt and pyqt

96 views
Skip to first unread message

illunara

unread,
Dec 14, 2014, 2:40:49 PM12/14/14
to python_in...@googlegroups.com
Hi everybody
Like most people, i started with pyqt to build complex GUI inside maya
but i got confused, why python? why not C++ since pyqt is just a warp around qt after all, and maya support it.
Also, it should be easier to manager when you write a plugin, right?
Thank for dropping by :D

Marcus Ottosson

unread,
Dec 14, 2014, 4:03:35 PM12/14/14
to python_in...@googlegroups.com
Yes, well, why C++, why not assembly or straight up binary? Now I'm confused too! :)

Joking aside, in a nutshell I suppose it's a matter of choosing the right tool for the right job, Python is more prone to rapid prototyping whereas C++ provides better performance and options. Whether it's easier to manage in terms of writing plug-ins is probably dependent on what you end up doing for plug-in. Is your plug-in exposing a command to Maya that you'd like to wrap in a beautiful GUI, or is it a complex deformer that only needs a "Start" button?

AK Eric

unread,
Dec 14, 2014, 4:51:07 PM12/14/14
to python_in...@googlegroups.com
Most of the UI's I write are interacting with other legacy ui's (whether authored via mel, Python cmds, or PySide) , or parts of the DAG.  If the only access I had to them was through the c++ api I'd probably shoot myself :P  Having access to PySide (for me) makes the actual interaction part with Maya trivial, compared to jumping through all the hoops needed to do simple stuff in the api. 

Justin Israel

unread,
Dec 14, 2014, 5:12:54 PM12/14/14
to python_in...@googlegroups.com

You don't always immediately get better performance by choosing C++ over python. It depends specifically on what your application is doing. A UI that is presenting a bunch of options and buttons to perform API actions in Maya is most likely going to have zero different between it being written in Python vs C++. But if that UI needs to do a bunch of calculations, or loops, etc, profiling might tell you that you get better performance in C++ (if with compiled extension libraries in Python still can't get you where you need to be). 

I am sure writing something in C++ can have its own set of complications, such as portability. PySide happens to be shipped with Maya now, so that means a pure python UI can be distributed for multiple platforms, where as a C++ UI would have to be cross compiled. 

Like others have said...choose the best tool for the job. I have some pretty heavy UIs in PySide and people can't tell the difference because they perform quite well. 


On Mon, 15 Dec 2014 10:51 AM AK Eric <war...@sbcglobal.net> wrote:
Most of the UI's I write are interacting with other legacy ui's (whether authored via mel, Python cmds, or PySide) , or parts of the DAG.  If the only access I had to them was through the c++ api I'd probably shoot myself :P  Having access to PySide (for me) makes the actual interaction part with Maya trivial, compared to jumping through all the hoops needed to do simple stuff in the api. 

--
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/5c207f32-635b-4bbd-bf83-1cd9453ee7d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anthony Tan

unread,
Dec 14, 2014, 5:20:41 PM12/14/14
to python_in...@googlegroups.com
For me, it's been because I've been scaling up in complexity - start out with the ol make-it-in-mel, then when that became insufficient for what i was after, to pyqt/pyside. It's also something that's got less complexity (in a fashion) and less dev environment overhead so *theoretically* someone else has a greater chance of picking up the pyqt and running with it if i get hit by a bus.
 
 
 
 
On Mon, Dec 15, 2014, at 08:51 AM, AK Eric wrote:
Most of the UI's I write are interacting with other legacy ui's (whether authored via mel, Python cmds, or PySide) , or parts of the DAG.  If the only access I had to them was through the c++ api I'd probably shoot myself :P  Having access to PySide (for me) makes the actual interaction part with Maya trivial, compared to jumping through all the hoops needed to do simple stuff in the api. 


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

Tuan Nguyen

unread,
Dec 15, 2014, 3:12:13 AM12/15/14
to python_in...@googlegroups.com
Thank everybody for sharing great experience.
I'm working on our pipeline tool right, so there are a lots of thing in there,include GUI, if possible, we want to pack everything up. And like you guys said, we have to compile everytime working with difference platform, maya's version.... but in my opinion, it's better than leave things all over the place. I lack of experience working with stuffs like this, so it would be awesome you can share with me experience.

If it a short-time project, i will definitely go with pyqt. This case is a little difference, i guess :D


Marcus Ottosson

unread,
Dec 15, 2014, 3:18:58 AM12/15/14
to python_in...@googlegroups.com

If by “pack everything up” you mean “make a binary” then you can do that with Python too.
https://github.com/pyinstaller/pyinstaller/wiki
http://www.py2exe.org/
http://cx-freeze.sourceforge.net/


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



--
Marcus Ottosson
konstr...@gmail.com

Justin Israel

unread,
Dec 15, 2014, 3:36:09 AM12/15/14
to python_in...@googlegroups.com

I've had great success with py2app and Pyinstaller. Personally it's not a matter of a short term or small project. It is whether C++ provides a benefit


Tuan Nguyen

unread,
Dec 15, 2014, 5:39:55 AM12/15/14
to python_in...@googlegroups.com
Ah, thanks for mention, i will try them now :D
And, its not like i think C++ is the key to everything, above python or anything. It just i'm still new to this, so i try to explore is as much as i can, and find the best way to handle things.

santoshad...@gmail.com

unread,
Jun 27, 2018, 8:17:45 AM6/27/18
to Python Programming for Autodesk Maya
On Monday, December 15, 2014 at 1:25:49 AM UTC+5:45, illunara wrote:
> Hi everybody
I have to run 4 different thread on pyqt5 , can anyone help me with that

Justin Israel

unread,
Jun 27, 2018, 8:19:40 AM6/27/18
to python_in...@googlegroups.com
You will need to try a bit harder than this, when asking questions. There is not enough information here to understand what you are trying to do. This is a 3.5 year old thread.
 

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

Panupat Chongstitwattana

unread,
Jun 28, 2018, 1:11:58 AM6/28/18
to Python Programming for Autodesk Maya
UI wise I love how PyQt/PySide code can be called everywhere on every platform. It's just a Python code, no compile needed and you can launch the same interface as stand-alone or from within Maya/Nuke. Python file being simple text files are easier to manage too IMO, no need to have separate compiled files for each OS and each Maya version your studio is using.
Reply all
Reply to author
Forward
0 new messages