class Ui_FaceWindow(object): def setupUi(self, FaceWindow): FaceWindow.setObjectName(_fromUtf8("FaceWindow")) FaceWindow.resize(533, 288) self.gridLayout = QtGui.QGridLayout(FaceWindow) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.faceView = WFaceListWidget(FaceWindow) self.faceView.setObjectName(_fromUtf8("faceView")) self.gridLayout.addWidget(self.faceView, 0, 0, 1, 1) self.retranslateUi(FaceWindow) QtCore.QMetaObject.connectSlotsByName(FaceWindow) def retranslateUi(self, FaceWindow): FaceWindow.setWindowTitle(_translate("FaceWindow", "Choose a smiley", None))
def setupUi(self, FaceWindow): FaceWindow.setObjectName(_fromUtf8("FaceWindow")) FaceWindow.resize(533, 288) self.gridLayout = QtGui.QGridLayout(FaceWindow) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.faceView = WFaceListWidget(FaceWindow) self.faceView.setObjectName(_fromUtf8("faceView")) self.gridLayout.addWidget(self.faceView, 0, 0, 1, 1) self.retranslateUi(FaceWindow) QtCore.QMetaObject.connectSlotsByName(FaceWindow)
class FaceWindow(QtGui.QDialog): def __init__(self, parent=None): super(FaceWindow, self).__init__(parent) self.setupUi(self) self.setupModels() self.faceName = "" def setupUi(self, widget): self.resize(533, 288) self.gridLayout = QtGui.QGridLayout(self) self.faceView = WFaceListWidget(self) self.gridLayout.addWidget(self.faceView, 0, 0, 1, 1) self.setWindowTitle(self.tr("Choose a smiley")) def setupModels(self): self.faceModel = FaceModel(self) self.faceView.setModel(self.faceModel) self.faceView.smileyClicked.connect(self.returnSmileyName) def returnSmileyName(self, faceName): self.faceName = "[%s]" % faceName self.done(True)
def setupUi(self, widget): self.resize(533, 288) self.gridLayout = QtGui.QGridLayout(self) self.faceView = WFaceListWidget(self) self.gridLayout.addWidget(self.faceView, 0, 0, 1, 1) self.setWindowTitle(self.tr("Choose a smiley"))