Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QtChart components do not show up after deployed with windeployqt
Forum Update on Monday, May 27th 2025

QtChart components do not show up after deployed with windeployqt

Scheduled Pinned Locked Moved Solved QML and Qt Quick
qmlqtchartqtchartswindeployqt
2 Posts 1 Posters 384 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    esvo
    wrote on 18 May 2023, 17:01 last edited by
    #1

    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?

    E 1 Reply Last reply 18 May 2023, 21:00
    0
    • E esvo
      18 May 2023, 17:01

      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?

      E Offline
      E Offline
      esvo
      wrote on 18 May 2023, 21:00 last edited by
      #2

      @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.

      1 Reply Last reply
      0
      • E esvo has marked this topic as solved on 18 May 2023, 21:01
      • E esvo marked this topic as a regular topic on 18 May 2023, 21:01
      • E esvo marked this topic as a question on 18 May 2023, 21:01
      • E esvo has marked this topic as solved on 18 May 2023, 21:01

      1/2

      18 May 2023, 17:01

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved