メイン ウィンドウから文字列をダイアログに表示する必要がありますが、問題が発生しています...
ここに私のコードがあります:
class Ui_MainWindow(QtGui.QMainWindow):
drive_signal = QtCore.pyqtSignal(str)
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(459, 280)
..... #non relevant code
.....
drives = win32api.GetLogicalDriveStrings()
drives = drives.split('\000')[:-1][1:]
self.drive_combo.clear()
self.drive_combo.addItems(drives)
self.drive_signal.emit(self.drive_combo.currentText())
.....
.....
class SubDialog(QtGui.QDialog):
def setupUi(self, Dialog):
Dialog.setWindowTitle(Ui_MainWindow.drive_signal.connect())
Dialog.resize(532, 285)
.....
.....
しかし、私はこのエラーが発生します:
AttributeError: 'PyQt4.QtCore.pyqtSignal' object has no attribute 'connect'
助けはありますか?