# Actuaciones condicionales

```
Rectangle {
    id: rect
    width: 200
    height: 200
    color: mouse.hovered ? "mediumspringgreen" : "deeppink"
    radius: 4
    HoverHandler {
        id: mouse
    }
}
```

```
property bool selected
text: selected ? "scheme selected" : ""
text: selected == true ? "scheme selected" : ""
text: selected == false ? "" : "scheme selected"
```

```
property real luminance
color: luminance > 0.5 ? "mediumspringgreen" : "deeppink"
color: luminance <= 0.5 ? "deeppink" : "mediumspringgreen"
```

```
property bool condition1: true
property bool condition2: true
if (luminance > 0.5 && luminance < 0.8)        // Y: deben cumplirse ambos
if (condition1 == true || condition2 == true)  // O: debe cumplirse 1 u otro 
if (condition1 || condition2)
```

```
property real luminance
color: {
    if (luminance > 0.5) {
        return "mediumspringgreen"
    }
    else {
        return "deeppink"
    }
}
```

```
property int option: 1
property color mycolor: "#9333b1"

color: {
    switch (option) {
        case 1: {
            return Qt.darker(mycolor, 2.0)
        }
        case 2: {
            return Qt.lighter(mycolor, 2.0)
        }
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.novaflowos.com/start/mauikit/documentacion-util/actuaciones-condicionales.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
