Skip to content

Ch 4: Save file error message fails #14

@btuftin

Description

@btuftin

The call to qtw.QMessageBox.critical(f"Could not open file: {e}") fails with error
TypeError: critical(QWidget, str, str, buttons: Union[QMessageBox.StandardButtons, QMessageBox.StandardButton] = QMessageBox.Ok, defaultButton: QMessageBox.StandardButton = QMessageBox.NoButton): not enough arguments

critical requires a reference to parent and a title, so this works:
qtw.QMessageBox.critical(self, "Error", f"Could not load file: {e}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions