Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.2.7, 6.5.0
-
63b27b664 (dev), 5295fc081 (6.5)
Description
Modules are usually split into a QML and a non-QML part. For example:
- <QTDIR>/lib/cmake/Qt6Charts/
- <QTDIR>/lib/cmake/Qt6ChartsQml/
- <QTDIR>/lib/cmake/Qt6DataVisualization/
- <QTDIR>/lib/cmake/Qt6DataVisualizationQml/
However, the Qt Data Visualization module is not split correctly. See the *Dependencies.cmake files:
Correct
set(_Qt6Charts_MODULE_DEPENDENCIES "Core;Gui;Widgets;OpenGL;OpenGLWidgets") set(_Qt6ChartsQml_MODULE_DEPENDENCIES "Charts;Core;Gui;Qml;Quick;OpenGL")
Wrong
set(_Qt6DataVisualization_MODULE_DEPENDENCIES "Core;Gui;OpenGL;Qml;Quick") set(_Qt6DataVisualizationQml_MODULE_DEPENDENCIES "DataVisualization;Core;Gui;OpenGL;Qml;Quick")
Consequences
A non-QML project that uses the Qt Data Visualization module gets a "qmlimportscan" target
cmake_minimum_required(VERSION 3.14) project(TestProj LANGUAGES CXX) find_package(Qt6 REQUIRED COMPONENTS Core DataVisualization) qt_add_executable(TestProj main.cpp) target_link_libraries(TestProj PRIVATE Qt6::Core Qt6::DataVisualization # <-- Comment this out to remove the qmlimportscan target )
Attachments
For Gerrit Dashboard: QTBUG-112813 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
471977,2 | Remove dependency on Qml target for the non-qml module | dev | qt/qtdatavis3d | Status: MERGED | +2 | 0 |
472620,2 | Remove dependency on Qml target for the non-qml module | 6.5 | qt/qtdatavis3d | Status: MERGED | +2 | 0 |