# QML syntax support

CLion provides syntax support in `.qml` files for both Qt5 and Qt6. Find below a few examples of QML code insight features.

* Highlighting and code completion for QML types and properties: ![QML completion](https://resources.jetbrains.com/help/img/idea/2026.2/cl_qml_completion.png)

* [Find Usages](find-highlight-usages.html) for QML symbols can be invoked by pressing `Alt+F7` (Windows), `⌥ F7` (macOS), `⌥ F7` (IntelliJ IDEA Classic (macOS)), `⌃ U` (macOS System Shortcuts), `Alt+F7` (XWin), `Alt+Shift+7` (GNOME), `Alt+Shift+7` (KDE), `Alt+F7` (Emacs), `Alt+F7` (Sublime Text), `⌥ F7` (Sublime Text (macOS)), `⌥ F7` (Xcode), `Shift+F12` (Visual Studio), `⇧ F12` (Visual Studio (macOS)), `Alt+F7` (ReSharper), `⌥ F7` (ReSharper (macOS)), `Ctrl+Shift+U` (QtCreator), `⌘ ⇧ U` (QtCreator (macOS)), `Alt+F7` (NetBeans), `Ctrl+G` (Eclipse), `⌘ ⇧ G` (Eclipse (macOS)) or clicking the hint in the editor: ![QML symbols usage hints](https://resources.jetbrains.com/help/img/idea/2026.2/cl_qml_usage_editor.png) In the usages popup you can navigate between them and tune the search (![](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.settings.svg)): ![QML symbols usage popup](https://resources.jetbrains.com/help/img/idea/2026.2/cl_qml_usage_popup.png)

* Another navigation option is [Structure View](file-structure.html) for the file contents. To open it, press `Alt+7` (Windows), `⌘ 7` (macOS), `⌘ 7` (IntelliJ IDEA Classic (macOS)), `⌘ 7` (macOS System Shortcuts), `Alt+7` (XWin), `Alt+7` (GNOME), `Alt+7` (KDE), `Alt+7` (Emacs), `Alt+7` (Sublime Text), `⌘ 7` (Sublime Text (macOS)), `⌘ 3` (Xcode), `Ctrl+Alt+F` (Visual Studio), `⌃ ⌥ F` (Visual Studio (macOS)), `Ctrl+F11` (ReSharper), `⌃ F11` (ReSharper (macOS)), `Alt+7` (QtCreator), `⌘ 7` (QtCreator (macOS)), `Ctrl+7` (NetBeans), `Alt+7` (Eclipse), `⌘ 7` (Eclipse (macOS)) or select `View | Tool Windows | Structure` from the main menu: ![QML file structure](https://resources.jetbrains.com/help/img/idea/2026.2/cl_qml_structure_view.png)

* [Quick Documentation](viewing-inline-documentation.html) popup is also available for QML symbols. Invoke it by hovering over a symbol or by pressing `Ctrl+Q` (Windows), `F1` (macOS), `⌃ J` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Ctrl+Q` (XWin), `Ctrl+Q` (GNOME), `Ctrl+Q` (KDE), `Ctrl+Q` (Emacs), `Ctrl+Q` (Sublime Text), `Ctrl+Q` (Sublime Text (macOS)), `⌘ ⌃ ⇧ /` (Xcode), `Ctrl+K, I` (Visual Studio), `⌘ K, I` (Visual Studio (macOS)), `Ctrl+Q` (ReSharper), `⌃ Q` (ReSharper (macOS)), `Ctrl+Q` (QtCreator), `Ctrl+Q` (QtCreator (macOS)), `Ctrl+Q` (NetBeans), `Alt+Middle-Click` (Eclipse), `⌥ Middle-Click` (Eclipse (macOS)): ![Quick documentation for QML symbols](https://resources.jetbrains.com/help/img/idea/2026.2/cl_qml_quickdoc.png)

Procedure: Enable QML language server

1. Go to `Settings | Languages & Frameworks | QML` and set the Enable QML language server checkbox.

![Enabling QML languafe server](https://resources.jetbrains.com/help/img/idea/2026.2/cl_qml_settings_server.png)

This option enables QML-specific code inspections if there are `qmlls` components installed.

2. Enable Use completion from QML language server to get language-server-based completion suggestions for QML symbols instead of those provided by CLion.

Procedure: Add extra QML import paths

1. Go to `Settings | Languages & Frameworks | QML`.

2. In the Extra QML imports field, provide the path to the directory containing additional QML modules.

> **Note:**
> Make sure to set the relative path, not the path to the module itself.
>
>
>
> For example, if you specify `./bin/` here, then an import statement like `import MYLIB` will search for the `./bin/MYLIB` directory.

Procedure: QML code style

You can use the IDE settings or [qmlformat](https://doc-snapshots.qt.io/qt6-dev/qtquick-tools-and-utilities.html#qmlformat) to configure code style for QML.

* By default, qmlformat is disabled and CLion uses the built-in code style settings. To access them, go to `Settings | Editor | Code Style | QML`:

![Code style settings for QML](https://resources.jetbrains.com/help/img/idea/2026.2/cl_qml_codestyle.png)

To quickly access the settings, select Configure Indents for qml QML in the bottom status bar switcher:

![Configure QML code style options](https://resources.jetbrains.com/help/img/idea/2026.2/cl_qml_codestyle_quickopen.png)

* To enable qmlformat, use the status bar switcher (see above) or go to `Settings | Languages & Frameworks | QML` and set the Enable 'qmlformat' as formatter checkbox.

> **Note:**
> Qmlformat overrides the IDE code style settings.

![Enabling qmlformat](https://resources.jetbrains.com/help/img/idea/2026.2/cl_qml_enable_qmlformat.png)

When qmlformat is enabled, its indicator is shown in the bottom status bar. You can also disable qmlformat from there:

![Qmlformat indicator in the status bar](https://resources.jetbrains.com/help/img/idea/2026.2/cl_qml_formatter_bottombar.png)

Procedure: Troubleshooting: enable QML syntax support manually

Follow the steps below if you get the editor notification indicating that CLion could not find the Qt installation path or QML imports directory:

![QML imports directory not found warning](https://resources.jetbrains.com/help/img/idea/2026.2/cl_qml_editorwarning.png)

1. Check that `CMAKE_PREFIX_PATH` points to the Qt installation directory.

Click CMake settings and add the following to CMake options:

```CMAKE
-DCMAKE_PREFIX_PATH=your_qt_installation
```

For example:

![Qt installation path in CMake options](https://resources.jetbrains.com/help/img/idea/2026.2/cl_qt_cmake_path.png)

2. In most cases, configuring CMake is enough for CLion to detect Qt and QML paths, however, if the notification is still there, you might need to set the paths manually. Click QML settings or go to `Settings | Languages & Frameworks | QML` to do so.

## Known issues and limitations

QML support is CLion is currently a work in progress. The list of known issues include:

* Many standard functions and methods are highlighted as unresolved ([CPP-31883](https://youtrack.jetbrains.com/issue/CPP-31883)).

* Structure View for QML files is being improved ( [CPP-31886](https://youtrack.jetbrains.com/issue/CPP-31886)).

* QML color scheme and code style settings are in development ( [CPP-30547](https://youtrack.jetbrains.com/issue/CPP-30547)).

## See also

### How tos

[Qt projects](qt-tutorial.html) [CMake profiles](cmake-profile.html)

