# SearchField

```
import QtQuick 2.15
import QtQuick.Controls 2.15
import org.mauikit.controls 1.3 as Maui

Maui.ApplicationWindow
{
    id: root

    property string query

    Maui.Page {
        anchors.fill: parent

        showCSDControls: true

        headBar.middleContent: Maui.SearchField
        {
            anchors.horizontalCenter: parent.horizontalCenter
            placeholderText: "Search for..."
            onAccepted: {
                query = text
            }
        }

        Label {
            id: label
            anchors.centerIn: parent
            text: query
        }
    }
}

```

```
// Opcionalmente

onAccepted: {
    label.text = text
}

Label {
    id: label
    anchors.centerIn: parent
}
```

<figure><img src="/files/zk7fnAHGgJHILCjrtRj3" alt=""><figcaption></figcaption></figure>

## Propiedades

{% embed url="<https://api.kde.org/mauikit/mauikit/html/classSearchField.html>" %}

{% embed url="<https://doc.qt.io/qt-5/qml-qtquick-controls-textfield.html>" %}


---

# 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/controles/searchfield.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.
