Skip to content

Window.hide() on a sub-window closes the live preview #10502

@LeonMatthes

Description

@LeonMatthes

Bug Description

Clicking the button in the below example closes the live preview, even if it should just hide the sub window.

Reproducible Code (if applicable)

import { Button } from "std-widgets.slint";

export component App inherits Window {
    background: red;
    sub := Window {
        background: green;
        width: 100px;
        height: 100px;
        visible: true;
    }

    Button {
        clicked => {
            sub.hide();
        }
    }
}

Environment Details

  • Slint Version: master
  • Platform/OS: Linux
  • Programming Language: Slint
  • Backend/Renderer: Qt

Product Impact

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:builtin elementsThe runtime data structures related to the items (mO,bT)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions