On 5/6/24 18:12, NIkolai Marchenko wrote:
Is there a way to automatically import qtquick.layouts while importing a custom module inside of qml file?

If you control the custom module and are OK with anyone importing the custom module always also importing QtQuick.Layouts, then yes. There is IMPORTS in qt_add_qml_module(), see https://doc.qt.io/qt-6/qt-add-qml-module.html#declaring-module-dependencies

If you are using Qt5, you are probably writing your qmldir files manually. In that case, there is the "import" declaration: https://doc.qt.io/qt-6/qtqml-modules-qmldir.html#module-import-declaration

The latter also exists in Qt 5.15 even though it's only documented for Qt6.

best regards,
Ulf
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to