Skip to content

Issue with QFileDialog.getSaveFileName and write confirmation (Create GUI Applications with Python & Qt6 [PyQt6 edition]) #1

@acmoudleysa

Description

@acmoudleysa

On page 161, when I run the code (basic/dialogs_file_4.py), to prompt the user to save a file, it appears that if the selected file already exists, the Windows system intercepts the dialog. Is this the expected behavior? If it is, what is the point of using the code present on the page 162 (basic/dialogs_file_4b.py).

Also, when I check the type of write_confirmed variable on page 162, it gives StandardButton. The conditional statements won't work if the type is StandardButton. When I check the documentation, there are two different return types. One returns StandardButton whereas, another returns int. How to know which one is returned? Can you provide an example?

By the way, really enjoying the book!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions