converting is pretty much as simple as not using pumpThread:  you get the 
running qApp and add your widgets to it. see my earlier message in this thread 
about how to convert one of the autodesk devkit examples.

i'm currently fleshing out some 2011-only tools for pymel that will convert 
back and forth between PyQt widgets, pymel UI objects, and maya gui string 
paths (like '|MainWindow|paneLayout|columnLayout1').  i'm also making an 
lsUI-like function for recursively finding PyQt objects by type, name, regex, 
etc.  unfortunately, it's too late for these changes to make it into 2011, but 
they'll make it into a future release.  

in 2011 every maya gui object is also a qt object, so using these new tools 
you'll be able to get the corresponding Qt object doing something like this:

import pymel.core as pm
maya_btn = pm.button()
qt_btn = maya_btn.qtObject()

still haven't worked out the details.

-chad


On Mar 23, 2010, at 12:40 AM, johnvdz wrote:

> great vids by the way..
> 
>   I sort of don't use much Maya UI stuff, i used maya 7 a bit but i just went 
> with pumpthread stuff using pyQT back in 8.5 so i guess what i'm asking is 
> there a replacement for pyQT Pumpthread.py?(see the devkit for more info). i 
> prefer to code in Pyqt for any dynamic QT stuff and then have 3 separate 
> files.. my QT .ui my pyQT UI functions for Dynamic UI functionality and then 
> maya Functions.  it would be nice to make my old Pyqt scripts Docable in the 
> future.
> 
> thought there might be more on the PyQT side of things but i have a feeling 
> there isn't much there.
> 
> i really haven't had time to chase this up yet so i was wondering if there 
> was a supported Simple Solution.
> 
> not sure how much Autodesk has done on the QT side of things. can we use PyQT 
> to Query existing Maya2011 QT UIs?
> 
> here is my basic QT lancher for pumpthread. for maya 8.5-2010..
> 
> i have a .ui file
> 
> this file(see below)
> 
> and a Functions file(myExternalFuctions.py)
> 
> 
> import myExternalFuctions #my other functions file for maya cmds
> UI_FILE = '/maya/scripts/python/myPyQT.UI'
> from PyQt4.QtCore import *###is it possible to Not have to have these in the 
> new QT UI?
> from PyQt4.QtGui import *###
> from PyQt4 import uic###
> 
> class MainWindow(QMainWindow):
>   def __init__(self, *p):
>       QMainWindow.__init__(self, *p)
>       uic.loadUi(UI_FILE, self)
> 
>      ###Myfuctions in here linked to .ui file commands that are passed to my 
> .py ,maya functions eg import myExternalFuctions
> 
> 
> 
> win = None
> 
> ### is there a way to Query QT in maya Instead of pumpthread so we can make 
> these docable...?
> def run_maya():
>   import pumpThread as pt ###importing the pumpthread script from the DevKit
>   global app
>   global win
>   pt.initializePumpThread() #make sure Pumpthread is running
> 
>   app = qApp
>   win = MainWindow()
>   win.show()
> 
>       if __name__ == '__main__': # runs them Main window
>   app = QApplication(sys.argv)
>   mw = MainWindow()
>   mw.show()
>   sys.exit(app.exec_())
>   print '%s done' % __file__
> 
> 
> anyway just trying to Look at Solution for when i migrate to 2011. QT UI 
> looks great but i would like to be able to Doc any pyQt UIs i have. i'm no qt 
> expert, but it would be really nice to have Pyqt Commands exposed for maya ui.
> 
> john
> 
> 
> 
> 
> 
> 
> 
> 
> 
> stephenkmann wrote:
>> http://area.autodesk.com/blogs/stevenr/maya_2011_highlight_qt_user_interface
>> 
>> sure no prob.....
>> 
>> 
>> On Mon, Mar 22, 2010 at 7:53 PM, Martin La Land Romero <
>> [email protected]> wrote:
>> 
>>  
>>> which demo movie? I guess I missed the beginning of this thread, can you
>>> fill me in stephenkmann
>>> 
>>> thanks
>>> 
>>> On Mon, Mar 22, 2010 at 4:36 PM, stephenkmann <[email protected]>wrote:
>>> 
>>>    
>>>> from the blog
>>>> 
>>>> For starters, this week I'm going to cover the basics of the new QT user
>>>> interface. I'll also discuss how QT Designer can be used to create UI for
>>>> your own custom tools. One thing I fail to point out in the demo movie is
>>>> that all of your old MEL based UI should still be fine. You can still use
>>>> the traditional MEL UI commands to create windows, buttons, sliders, etc...
>>>> just as you always did. But now you have to option of creating your UI
>>>> directly with QT as well.
>>>> 
>>>> hope that helps
>>>> 
>>>> from what I've seen so far all my ui works the same as it did before...
>>>> still have some things to test
>>>> 
>>>> -=s
>>>> 
>>>> On Sun, Mar 21, 2010 at 7:46 PM, johnvdz <[email protected]>wrote:
>>>> 
>>>>      
>>>>> so whats the best solution for migrating all your old Pumpthread UIs to
>>>>> 2011? not sure if i want to go to using maya window QT method as i like to
>>>>> use alot of the pyqt stuff for alot of functionaliy.
>>>>> 
>>>>> 
>>>>>        
>>>> --
>>>> -=s
>>>> 
>>>> --
>>>> http://groups.google.com/group/python_inside_maya
>>>> 
>>>> To unsubscribe from this group, send email to python_inside_maya+
>>>> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
>>>> ME" as the subject.
>>>> 
>>>>      
>>> 
>>> --
>>> Martin La Land Romero
>>> www.martinromerovfx.com
>>> http://martinromerovfx.blogspot.com/
>>> [email protected]
>>> (415)261-2172
>>> 
>>> --
>>> http://groups.google.com/group/python_inside_maya
>>> 
>>> To unsubscribe from this group, send email to python_inside_maya+
>>> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
>>> ME" as the subject.
>>> 
>>>    
>> 
>> 
>> 
>>  
> 
> -- 
> http://groups.google.com/group/python_inside_maya
> 
> To unsubscribe from this group, send email to 
> python_inside_maya+unsubscribegooglegroups.com or reply to this email with 
> the words "REMOVE ME" as the subject.

-- 
http://groups.google.com/group/python_inside_maya

To unsubscribe from this group, send email to 
python_inside_maya+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to