--- a/eric6/UI/FindFileNameDialog.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/UI/FindFileNameDialog.py Tue Mar 02 17:17:09 2021 +0100 @@ -52,12 +52,14 @@ self.fileList.headerItem().setText(self.fileList.columnCount(), "") self.stopButton = self.buttonBox.addButton( - self.tr("Stop"), QDialogButtonBox.ActionRole) + self.tr("Stop"), QDialogButtonBox.ButtonRole.ActionRole) self.stopButton.setToolTip(self.tr("Press to stop the search")) self.stopButton.setEnabled(False) - self.buttonBox.button(QDialogButtonBox.Open).setToolTip( - self.tr("Opens the selected file")) - self.buttonBox.button(QDialogButtonBox.Open).setEnabled(False) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Open).setToolTip( + self.tr("Opens the selected file")) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Open).setEnabled(False) self.project = project self.extsepLabel.setText(os.extsep) @@ -72,7 +74,9 @@ """ if button == self.stopButton: self.shouldStop = True - elif button == self.buttonBox.button(QDialogButtonBox.Open): + elif button == self.buttonBox.button( + QDialogButtonBox.StandardButton.Open + ): self.__openFile() def __openFile(self, itm=None): @@ -150,7 +154,8 @@ del locations self.stopButton.setEnabled(False) - self.fileList.header().resizeSections(QHeaderView.ResizeToContents) + self.fileList.header().resizeSections( + QHeaderView.ResizeMode.ResizeToContents) self.fileList.header().setStretchLastSection(True) if found: @@ -239,7 +244,7 @@ @param current current item (QTreeWidgetItem) @param previous prevoius current item (QTreeWidgetItem) """ - self.buttonBox.button(QDialogButtonBox.Open).setEnabled( + self.buttonBox.button(QDialogButtonBox.StandardButton.Open).setEnabled( current is not None) def show(self):