# Icons

When you create your own KDE application you will probably want to have icons in it respecting your user's icon theme.

This is possible with the help of [QIcon::fromTheme](https://doc.qt.io/qt-5/qicon.html#fromTheme) for QtWidgets applications or [Kirigami's Icon](docs:kirigami2;Icon) for QtQuick applications. Both take the name of the icon in the icon theme as an argument.

Plasma and all the other major Linux deskops follow the Freedesktop [icon specification](http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html) and [naming specification](http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html). A fallback mechanism is also present so that if the `document-open-recent` icon is not present, the `document-open` icon will be displayed instead, and if the `document-open` icon is also not present the `document` icon will be displayed.

### Finding the right icons

KDE provides an application to search for icons, Cuttlefish. It is generally available in the `plasma-sdk` package available through your package manager on Linux.

![Screenshot of cuttlefish](/files/J0vPznczJWXueM988l8L)

Cuttlefish allows you to search for icons by name and by category. You can inspect the different color schemes of an icon as well as view a selected icon in other themes.

### Example

In a traditional QtWidgets application:

```cpp
QIcon undoicon = QIcon::fromTheme("edit-undo");
```

In a QtQuick application:

```qml
import org.kde.kirigami 2.14 as Kirigami

Kirigami.Icon {
    source: "edit-undo"
} 
```

### Other platforms than Linux

On other platforms, the icon theme is not available.

#### Android

On Android, you can use the [kirigami\_package\_breeze\_icons()](https://invent.kde.org/frameworks/kirigami/-/blob/master/KF5Kirigami2Macros.cmake#L5) CMake function to package the Breeze icons you are using.

```cmake
if(ANDROID)
    kirigami_package_breeze_icons(ICONS
        edit-undo
        edit-redo
    )
endif()
```


---

# 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/kde-developer-platform/readme/features/_index.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.
