def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.ui = Ui_MainWindow() self.ui.setupUi(self) self.tobeSearched = [] self.ui.progressUpdate.append( '''<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <span style=" font-size:14pt; font-weight:400;">PySubD Subtitle Downloader</span> <br> Drag and drop your movie files or folders here</p><p></p>''' ) self.subd = SubtitleDownload() self.connect(self.subd, QtCore.SIGNAL('updateAvailable()'), self.updateAvailable) #New style PyQT signal and slots self.ui.cancelButton.clicked.connect(self.cancelDownload) self.ui.browseButton.clicked.connect(self.openFileDialog) self.ui.lang_selector.currentIndexChanged.connect(self.changeLanguage) communicator.updategui.connect(self.append_updates) communicator.found_video_file.connect(self.update_found_files) communicator.downloaded_sub.connect(self.update_downloaded_subs) communicator.all_download_complete.connect(self.download_complete) self.cancelled = False self.lang = str(self.ui.lang_selector.currentText()) self.ui.authorLabel.setOpenExternalLinks(True) self.ui.cancelButton.setDisabled(True)