I use multiple inheritance... import ui_Browser class Browser(QtGui.QWidget, ui_Browser.Ui_Form): def __init__(self, parent=None): super(Browser, self).__init__(parent) self.setupUi(self) self.setObjectName('Browser') self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
-Dave On Thu, Aug 5, 2010 at 2:39 PM, meljunky <br...@meljunky.com> wrote: > Trying to get QT Ui file to work in Maya I could use the loadUI > command for example: > > import maya.cmds as cmds > dialog = cmds.loadUI(f=r'C:/Python26/Lib/site-packages/PyQt4/examples/ > designer/calculatorform/calculatorform.ui') > cmds.showWindow(dialog) > > Don't expect the calculator to actually work but the UI opens in Maya. > But, I want to be able to edit UI elements so I used uic.compileUi to > convert the file into a Python file in hopes to make method calls to > add and remove UI elements while the window is open. > > The first four lines are: > from PyQt4 import QtCore, QtGui > > class Ui_CalculatorForm(object): > def setupUi(self, CalculatorForm): > ... > > At this point I don't know how to call the Ui_CalculatorForm class > method setupUi since it needs a different class called CalculatorForm. > > Thanks in advance. > > -- > http://groups.google.com/group/python_inside_maya > -- David Moulder http://www.google.com/profiles/squish3d -- http://groups.google.com/group/python_inside_maya