Skip to content

Slintpad: freeze and misrendering of popups and context menus #8892

Open
@Skilvingr

Description

@Skilvingr

Bug Description

Hi, possibly related to #8891.

What are the bugs?

  1. [All styles] When executed in Slintpad, the attached code makes the preview part of the page freeze as soon as one clicks the item in the context menu ("Open popup").
  2. [Only native] Commenting line 35 and uncommenting line 36, that is, bypassing the context menu, the popup shows correctly, but the button inside is not rendered correctly (it seems a text more than a button).

Both the codes work as expected if executed in a Rust project with Qt 6.9.0-1 as backend and Arch Linux as host OS.

What behavior did you expect, and what happened instead?

  1. The viewer should not freeze.
  2. The button should be rendered correctly.

Steps to reproduce the issue

Just run the attached code in Slintpad.

Any error messages or logs, if available.

Nothing, even in the console.

Reproducible Code (if applicable) [Edited: shortened by removing useless code]

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

export component App inherits Window {
    preferred-width: 700px;
    preferred-height: 500px;

    popup := PopupWindow {
        width: root.width / 2;
        height: root.height / 2;

        Rectangle {
            background: Colors.red;

            Button {
                text: "Click me";
            }
        }
    }

    context_menu := ContextMenuArea {
        Menu {
            MenuItem {
                title: "Open popup";
                activated => {
                    context_menu.close();
                    popup.show();
                }
            }
        }
    }

    Button {
        text: "Show context menu";
        clicked => {
            context_menu.show(self.absolute-position);
            //popup.show();
        }
    }
}

Environment Details

  • Slint Version: 1.12.1 (I suppose) 1.12.0
  • Platform/OS: Slintpad
  • Programming Language:
  • Backend/Renderer:

Product Impact

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions