qml module is not installed error
Unsolved
QML and Qt Quick
-
I have a qml module with plugin, the qml files used to put in local files. Now we move the qml files into resource, and then I get the module not installed error.
I do add resource into app .pro file.
The original file structure is:
The part of the new resource file is:<RCC> <qresource prefix="/qml/components"> <file>private/qmldir</file> <file>private/AlphaInput/AlphaInputBase.qml</file> <file>private/AlphaInput/AlphaInput.qml</file> <file>private/BorderImageMask.qml</file> <file>private/BorderImageScaled.qml</file> <file>private/ButtonGraphics/ButtonGraphics.qml</file> <file>private/ComboBox/ListDelegate.qml</file> <file>private/ComboBox/List.qml</file> <file>private/ComboCheckBox/CheckBox.qml</file> <file>private/ComboCheckBox/CheckListDelegate.qml</file> <file>private/ComboCheckBox/CheckList.qml</file> <file>private/ComponentBase.qml</file>ource> </qresource> </RCC>
The private/qmldir:
module com.nov.novos.components.private plugin component typeinfo plugins.qmltypes AlphaInput 1.0 AlphaInput/AlphaInput.qml AlphaInputBase 1.0 AlphaInput/AlphaInputBase.qml BorderImageMask 1.0 BorderImageMask.qml BorderImageScaled 1.0 BorderImageScaled.qml ButtonGraphics 1.0 ButtonGraphics/ButtonGraphics.qml CheckBox 1.0 ComboCheckBox/CheckBox.qml CheckList 1.0 ComboCheckBox/CheckList.qml CheckListDelegate 1.0 ComboCheckBox/CheckListDelegate.qml CircularIndicatorGraphics 1.0 ProgressIndicatorGraphics/CircularIndicatorGraphics.qml ComponentBase 1.0 ComponentBase.qml ComponentContext 1.0 ComponentContext.qml ComponentResizeHandles 1.0 ComponentResizeHandles.qml ContextMenu 1.0 ContextMenu/ContextMenu.qml DefaultSetpointPointer 1.0 SetpointPointer/DefaultSetpointPointer.qml ErrorBox 1.0 ErrorBox.qml FeedbackSplash 1.0 FeedbackSplash/FeedbackSplash.qml FloatingScrollBar 1.0 ScrollBar/FloatingScrollBar.qml GaugeBase 1.0 Gauge/GaugeBase.qml GaugeTitle 1.0 GaugeTitle/GaugeTitle.qml Icon 1.0 Icon/Icon.qml ImageMask 1.0 ImageMask.qml KeyBoard 1.0 KeyBoard/KeyBoard.qml KeyPad 1.0 KeyPad/KeyPad.qml LinearIndicatorGraphics 1.0 ProgressIndicatorGraphics/LinearIndicatorGraphics.qml LineInput 1.0 LineInput.qml List 1.0 ComboBox/List.qml ListDelegate 1.0 ComboBox/ListDelegate.qml NumericInputBase 1.0 NumericInput/NumericInputBase.qml NumericText 1.0 NumericText.qml PopUpBase 1.0 PopUp/PopUpBase.qml ScrollBar 1.0 ScrollBar/ScrollBar.qml SegmentDelegate 1.0 SegmentedButton/SegmentDelegate.qml SetpointPointer 1.0 SetpointPointer/SetpointPointer.qml StyleSelector 1.0 StyleSelector/StyleSelector.qml Tab 1.0 TabView/Tab.qml TableView 1.0 TableView/TableView.qml ToggleArrow 1.0 ToggleArrow/ToggleArrow.qml ToggleButton 1.0 ToggleButton/ToggleButton.qml ToggleSwitchGraphics 1.0 ToggleSwitch/ToggleSwitchGraphics.qml VisibleArea 1.0 VisibleArea.qml ComponentFunctions 1.0 componentfunctions.js NovosMath 1.0 novosmath.js
The .pro file:
RESOURCES += \ component_resources.qrc \ ../../qml/com/nov/novos/components/qml_resources.qrc
The qml import code:
import QtQuick 2.12 import com.nov.novos.components.private 1.0
The error message:
03/19/24 15:51:58:458 [2684] WARN - qml\qqmlcomponent.cpp:851 class QObject *__thiscall QQmlComponentPrivate::beginCreate(class QQmlContextData *) - QQmlComponent: Component is not ready 03/19/24 15:51:58:458 [2684] ERROR - appwindow.cpp:60 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - "Error:qrc:/novos_background.qml:2 module \"com.nov.novos.components.private\" is not installed\n"
When print the qrc path, I do see the files:
03/19/24 15:53:03:126 [5292] INFO - appwindow.cpp:45 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - ":/qml/components/private/Container" 03/19/24 15:53:03:126 [5292] INFO - appwindow.cpp:45 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - ":/qml/components/private/Container/Container.qml" 03/19/24 15:53:03:126 [5292] INFO - appwindow.cpp:45 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - ":/qml/components/private/NumericInput" 03/19/24 15:53:03:126 [5292] INFO - appwindow.cpp:45 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - ":/qml/components/private/NumericInput/NumericInputBase.qml" 03/19/24 15:53:03:126 [5292] INFO - appwindow.cpp:45 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - ":/qml/components/private/ComboBox" 03/19/24 15:53:03:126 [5292] INFO - appwindow.cpp:45 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - ":/qml/components/private/ComboBox/List.qml" 03/19/24 15:53:03:126 [5292] INFO - appwindow.cpp:45 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - ":/qml/components/private/ComboBox/ListDelegate.qml" 03/19/24 15:53:03:126 [5292] INFO - appwindow.cpp:45 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - ":/qml/components/private/qmldir" 03/19/24 15:53:03:126 [5292] INFO - appwindow.cpp:45 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - ":/qml/components/private/ComponentResizeHandles.qml" 03/19/24 15:53:03:126 [5292] INFO - appwindow.cpp:45 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - ":/qml/components/private/FeedbackSplash" 03/19/24 15:53:03:126 [5292] INFO - appwindow.cpp:45 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - ":/qml/components/private/FeedbackSplash/FeedbackSplash.qml" 03/19/24 15:53:03:126 [5292] INFO - appwindow.cpp:45 void __thiscall AppWindow::init(class AppList *,struct AppList::AppInfo) - ":/qml/components/private/ImageMask.qml"