Hi.
I'm experimenting with some code and I'm curious what the
@QtCore.pyqtSlot() decoration does?
I saw it from some other codes, but even without it, testdef() still
returns the widget's name correctly.
from PyQt4 import QtGui, QtCore
class cb(QtGui.QComboBox):
def __init__(self):
super(cb, self).__init__()
self.setObjectName("test name")
self.currentIndexChanged.connect(self.testdef)
for i in range(5):
self.addItem(str(i))
@QtCore.pyqtSlot()
def testdef(obj):
print str(obj.sender().objectName())
--
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.