| 1 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
| 2 | // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 |
| 3 | |
| 4 | export Test := Rectangle { |
| 5 | property <bool> condition; |
| 6 | |
| 7 | GridLayout { |
| 8 | Row { |
| 9 | if (condition): Text { |
| 10 | // ^error{'if' or 'for' expressions are not currently supported in grid layouts} |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | if (condition): Text { |
| 15 | // ^error{'if' or 'for' expressions are not currently supported in grid layouts} |
| 16 | |
| 17 | } |
| 18 | |
| 19 | for x in 5: Text { |
| 20 | // ^error{'if' or 'for' expressions are not currently supported in grid layouts} |
| 21 | |
| 22 | } |
| 23 | } |
| 24 | } |
| 25 | |