Hi, 
I have a pm.menu in which holds menuItems. In one of them I would like to 
call a QtWidget which was written inside the class:

def CreateMenu():
    ...
    toolUI = fileName.className()
    pm.menuItem(label="Tool", command=toolUI.run)

menuItem does not accept a function which calls class as it considers class 
as an argument (as far as I understand). The function inside the class that 
I want to run does not have any arguments.

the main menu was written in function, not as a class. I cannot change 
that. Is there a way to run a module inside menuItem?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/b5ce5c79-4757-4d48-8229-a03fa0b447ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to