Skip to content

With the Qt back end, returning KeepWindowShown from on_close_requested can cause quit_event_loop() to be ignored #10966

@npwoods

Description

@npwoods

Bug Description

There seems to a difference between the Winit and Qt back ends. In the attached program bug-demo.zip
, we have:

  • An on_close_requested handler that always returns CloseRequestResponse::KeepWindowShown
  • A button that causes quit_event_loop() to be invoked

When running with the Winit back end (cargo run -- --backend winit), the "Quit" button exits the program as expected. But with the Qt back end (cargo run -- --backend qt), the "Quit" button seems to be ignored. It seems like returning CloseRequestResponse::KeepWindowShown causes the quit to be aborted.

Reproducible Code (if applicable)

Environment Details

  • Slint Version: 1.15.1
  • Platform/OS: Windows
  • Programming Language: Rust
  • Backend/Renderer: Qt

Product Impact

No response

Metadata

Metadata

Assignees

Labels

a:backend-qtThe Qt backend - including the qt style (mO,bS)

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions