So I've made a window for Maya in QtDesigner, and I've tried assigning a label
a pixmap from QtDesigner, from the python script that references de ui file,
and still I can't get the pixmap to work. I've also change a thousand times the
.jpg path and none of them work. I paste my Python script:
#----------------------------------------
from PyQt4 import QtGui, QtCore, uic
import platform, sys, random
import maya.cmds as cmds
os = platform.system()
if os == "Windows":
uiFile = 'path_to_ui'
else:
uiFile = 'path_to_ui'
form_class, base_class = uic.loadUiType(uiFile)
class textureReleaseUI(form_class, base_class):
def __init__(self, parent=mui.getMayaWindow()):
super(textureReleaseUI, self).__init__(parent)
self.setupUi( self )
self.initUI()
def initUI(self):
pixmap = QtGui.QPixmap("Y:\dev\python\mnmModelToolsHeader.jpg")
self.header.setPixmap(pixmap)
self.connectSignals()
def connectSignals(self):
self.connect(self.orient_btn, QtCore.SIGNAL('pressed()'), orientTip)
self.connect(self.clean_btn, QtCore.SIGNAL('pressed()'), main)
self.connect(self.rename_btn, QtCore.SIGNAL('pressed()'), checkNaming)
self.connect(self.none_btn, QtCore.SIGNAL('pressed()'), printLines)
def runUI():
#global app
global win
#app=QtGui.QApplication(sys.argv)
win = textureReleaseUI()
win.show()
#sys.exit(app.exec_())
runUI()
--
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.