def showBrowseImageDialog(self): """Show a file dialog for choosing an image from disc.""" fileDialog = QtWidgets.QFileDialog(self, caption="Open Image", filter="Image Files (*.png *.jpg)") fileDialog.fileSelected.connect(self.setThumbnailPath) fileDialog.exec_()
def showLoadImageDialog(self): """Show a file dialog for choosing an image from disc.""" if not self._force and os.path.exists(self.path()): self.showWarningDialog() fileDialog = QtWidgets.QFileDialog( self, caption="Open Image", filter="Image Files (*.png *.jpg *.bmp)") fileDialog.fileSelected.connect(self._fileSelected) fileDialog.exec_()