Would you mind posting a gist <https://gist.github.com/> of a small but complete example of the crash? I am happy to give it a test over here.
On Thu, Nov 12, 2015 at 4:58 PM yann19 <[email protected]> wrote: > Tried it, same error too. > Truth be told, I am reusing back the same constructor as it was in which > it is working in other scripts of mine.. > > This is how I launch the code: > > import sys > sys.path.insert(0, '/user_data') > import mig > reload (mig) > > win = mig.migUI() > win.show() > > > > On Thursday, November 12, 2015 at 11:45:54 AM UTC+8, Justin Israel wrote: > >> Can you also show the code you are using to launch this code? >> >> I'm not sure if this will help, but can you try modifying that first line >> in your migUI __init__() to: >> >> QtGui.QWidget.__init__(self, parent) >> >> The way you are doing it now doesn't seem like a proper constructor call. >> >> On Thu, Nov 12, 2015 at 4:30 PM yann19 <[email protected]> wrote: >> >>> 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 >>> <https://groups.google.com/d/msgid/python_inside_maya/d645fb7c-7976-4e20-a101-9d60cc4fec10%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > 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/3f04b8ab-8e09-490c-89fa-7ce357e479a6%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/3f04b8ab-8e09-490c-89fa-7ce357e479a6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAPGFgA2b-_97Ge78aWpicsQdpnMaaYAEUYCSFRf4O1S-%2Bd%3D8Qg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
