Skip to content

Commit

Permalink
inputconfigdialogue: Update buttonrole enum to pyqt6.
Browse files Browse the repository at this point in the history
Roles for buttons seem to have been updated since update to pyqt6. Change usage accordingly
  • Loading branch information
ToveRumar committed Apr 24, 2024
1 parent 80f6ef6 commit 23c99c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cfclient/ui/dialogs/inputconfigdialogue.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def _show_config_popup(self, caption, message, directions=[]):
self._combined_button = QtWidgets.QPushButton('Combined Axis ' +
'Detection')
self.cancelButton = QtWidgets.QPushButton('Cancel')
self._popup.addButton(self.cancelButton, QMessageBox.DestructiveRole)
self._popup.addButton(self.cancelButton, QMessageBox.ButtonRole.DestructiveRole)
self._popup.setWindowTitle(caption)
self._popup.setWindowFlags(Qt.WindowType.Dialog | Qt.WindowType.MSWindowsFixedSizeDialogHint)
if len(directions) > 1:
Expand All @@ -219,7 +219,7 @@ def _show_config_popup(self, caption, message, directions=[]):
self._combined_button.setCheckable(True)
self._combined_button.blockSignals(True)
self._popup.addButton(self._combined_button,
QMessageBox.ActionRole)
QMessageBox.ButtonRole.ActionRole)
self._popup.setText(message)
self._popup.show()

Expand Down

0 comments on commit 23c99c7

Please sign in to comment.