Layouting::If Class
class Layouting::If根据布尔条件有条件地包含布局项。更多...
| Header: | #include <If> |
详细说明
使用>> 运算符将Then子句和可选的Else子句串联起来:
Column {
If(condition) >> Then { label1, label2 } >> Else { label3 },
}在构建时,系统会评估该条件,并将匹配的项目列表内联到外围布局中。
另请参阅 Layouting::Then 和Layouting::Else 。
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.