Native Maya UI Elements in PyQt interface

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  11 November 2011
Native Maya UI Elements in PyQt interface

Hey Guys,

I was wondering if there was a way to get interfaces you've created before (without PyQt) in Mel or Python into a PyQt layout, for example as if its a widget.

I'm currently trying to create a special window to hold a combination of my older scripts. I want the global box to run on PyQt and contain sub-interfaces/modules from older scripts (plain MEL/Python UI) but with minimal changes to my original UI scripts, preferably close to nothing.

Any tips on how to do this? Since the Maya UI commands are now actually creating PyQt elements, how can I get them to work together nicely?

Thanks in advance.

  11 November 2011
Check out the API class MQtUtil: t_util_html

You can use that in combination with the PyQt 'sip' module.
  11 November 2011
So does this make it possible to run Maya native commands to become part of the layout or add them to the layout? For example:


I'll try to do some more research into the link you gave me. So far I've already been having a hard time installing the 'sip' module within Maya's Python.


  11 November 2011
Installing PyQt & sip in maya is a whole other topic. But once you have that going you can use MQtUtil.
I found this nice example:
  11 November 2011
To embed a native Maya Qt widget into a PyQt widget you need to create the Maya widget first, and then using PyQt alter it's parent to be the proper location/layout inside your PyQt hierarchy.

Here's an example embedding a cmdScrollFieldExecuter (Script editor input) into a QMainWindow:
__________________ - Technical Artist
  11 November 2011
Hey Nathan,

That's awesome. Once I get this thing up and running I'll start playing with it!

Thanks all.

  11 November 2011
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 04:50 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.