QtChart components do not show up after deployed with windeployqt
-
Project is built with Qt 6.4.1 Mingw 64-bit
The application is a QApplication with a QGuiApplication Engine. The charts are created with qml files. The main qml file uses a loader to load in the qml files with charts.Building the project with qtcreator shows all the charts as needed. Once I deploy the application with windeployqt with the --qmldir <project dir> option, the executable can run but the chart components are missing.
Windeployqt populates the build folder with the Qt6Charts.dll and Qt6ChartsQml.dll as well as the QtCharts folder, but the chart components do not show up in the application.
Any ideas on how to fix this?
-
@esvo
[PROBLEM SOLVED]
Turns out its a problem that is independent of windeployqt or qtcharts. Will be logging my findings here in case anyone else comes across this specific-ish issue as well. (Or if anyone has other insights)The qml files with the charts being loaded in use singletons. I registered these singletons in the c++ main. When I registered the singletons I have the code looking into the working directory for the singleton qml files using the QDir::currentPath() function.
The folder including all the singletons must be included in the same folder as the exe for the app to have access to these files. Dropping the folder with the singleton qml files into the same folder as the exe fixes the problem.
-
-
-
-