You will notice several different widgets in the dialog. For example, the field which accepts the input image path or the output directory path is a QLineEdit
. The widget where image format is specified is a QCombobox
. On similar lines, the OK and Cancel buttons are QPushButton
. As an exercise, you can open up the thumbnailMaker.ui
file and click on each element to see the associated QT class from the Property Editor.
With this, let's learn how the widgets are connected.
Open the file
ThumbnailMakerDialog.py
. The_connect
method of classThumbnailMakerDialog
is copied. The method is called in the constructor of this class.def _connect(self): """ Connect slots with signals. """ self.connect(self._dialog.inputFileDialogButton, SIGNAL("clicked()"), self._openFileDialog) self.connect(self._dialog.outputLocationDialogButton, SIGNAL("clicked()"), self._outputLocationPath) self.connect(self._dialog.okPushButton, SIGNAL...