[Interest] Qml Linting Error - Warnings occurred while importing module "QtQuick.Controls":

Nuno Santos nuno.santos at imaginando.pt
Mon Dec 19 16:29:47 CET 2022


Hi,

I’m trying to take advantage of the new Qml Linting Tools provided by the Qt Quick Compiler Extensions (TP) to enhance the qml code and thus improve its performance.

This is all new to me and sometimes I’m faced with errors that does not seem error nor they give problems when actually running the code. For example, what is wrong with the following code in the linter perspective?

import QtQuick.Controls

Pane {
    background: null
    focusPolicy: Qt.ClickFocus
}

Because it gives the following error:

Warning: GPane.qml:1:1: Warnings occurred while importing module "QtQuick.Controls":
import QtQuick.Controls
^^^^^^
---
Warning: QtQuick.Controls uses optional imports which are not supported. Some types might not be found.
---

Warning: GPane.qml:3:1: Pane was not found. Did you add all import paths?
Pane {
^^^^

Thanks!

Regards,

Nuno


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20221219/f04450ff/attachment.htm>


More information about the Interest mailing list