python - Don't understand the pyqt error -
i apologize in advance if title sounds vague... feel free edit if necessary? in bit of dilemma here used work last time after changing bit of code in main script, ui seems having problem.
there 2 scripts here, mmvstool.py (execution script) , mmvstoolui.py (ui interface script)
correct me if wrong, using from pyqt4 import qtcore, qtgui
importing sentence pyqt widgets , in scripts have been using pyside...
when error seems telling me use otherwise?
# traceback (most recent call last): # file "<string>", line 1, in <module> # file "/user_data/maya/python/mmvstool.py", line 14, in __init__ # self.setupui( self ) # file "/user_data/maya/python/mmvstoolui.py", line 18, in setupui # mmvsftool.setwindowicon(icon) # typeerror: # 'pyside.qtgui.qwidget.setwindowicon' called wrong argument types: # pyside.qtgui.qwidget.setwindowicon(qicon) # supported signatures: pyside.qtgui.qwidget.setwindowicon(pyside.qtgui.qicon)
some glimpse onto ui code error referring to:
from pyqt4 import qtcore, qtgui class ui_mmvstool(object): def setupui(self, mmvstool): mmvsftool.setobjectname("mmvstool") mmvsftool.resize(419, 752) icon = qtgui.qicon() icon.addpixmap(qtgui.qpixmap(":/mmvsicons/mmvsftool"), qtgui.qicon.normal, qtgui.qicon.off) mmvsftool.setwindowicon(icon)
portion in main script:
from mmvstoolui import ui_mmvstool qtswitch import qtgui maya import cmds mc, mel mm import os class mmvsftool( qtgui.qwidget, ui_mmvstool ): """ """ def __init__( self, parent = none ): super( mmvsftool, self ).__init__( parent = parent ) self.setupui( self ) # nothing yet self.modewidget.setvisible( false )
i think see problem now.
from qtswitch import qtgui # maybe in pyside? not compatible pyqt4
change to:
from pyqt4 import qtgui
then see if works.
Comments
Post a Comment