Hi all. I have drafted up a UI using the Qt Designer, converted from .ui
into .py however while I am trying to use it in my main code, I keep
getting into error where it state line 16 (the first line that indicates
formLayoutWidget_3), fyi I have saved the ui file as "migToolUI"
from PyQt4 import QtCore, QtGui
class Ui_migTool(object):
def setupUi(self, migTool):
migTool.setObjectName("migTool")
migTool.resize(305, 450)
self.formLayoutWidget_3 = QtGui.QWidget(migTool)
self.formLayoutWidget_3.setGeometry(QtCore.QRect(0, 10, 301, 441))
self.formLayoutWidget_3.setObjectName("formLayoutWidget_3")
This is the main code that I am trying to execute from.
from PySide import QtCore
from PySide import QtGui
import sys
import maya.cmds as cmds
import pymel.core as pm
import migToolUI
reload (migToolUI)
class migUI(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent = None, modal = False)
self.ui = migToolUI.Ui_migTool()
self.ui.setupUi(self)
The following is the error that I keep getting from Maya:
# Error: TypeError: file /user_data/migToolUI.py line 16: QWidget(QWidget
parent=None, Qt.WindowFlags flags=0): argument 1 has unexpected type
'migUI' #
Any advice is greatly appreciated!
--
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/d645fb7c-7976-4e20-a101-9d60cc4fec10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.