slint/tests/cases/crashes/alias_in_if.slint
Aurindam Jana 3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00

26 lines
780 B
Text

// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
App := Rectangle {
property <string> hello: "ooo";
if (hello != "") : Text { text <=> hello; }
property<bool> test1: hello == "ooo";
// Another crash:
property <string> directory: "hello";
vl := VerticalLayout {
if true: pp:= Rectangle {
property <string> text <=> root.directory;
HorizontalLayout {
inner := Text {
text: pp.text;
}
}
}
}
ref := Text { text: "hello"; }
property<bool> test2: vl.preferred-width == ref.preferred-width;
property<bool> test: test1 && test2;
}