Closed ThomasDebrunner closed 4 years ago
I can run the todo demo just fine from within QT Creator. However, the editor keeps complaining that QML module not found (QuickFlux). I am using CMake, and this is my CmakeLists.txt:
todo
QML module not found (QuickFlux)
CmakeLists.txt
cmake_minimum_required(VERSION 3.10.0) project(todo) set(CMAKE_VERBOSE_MAKEFILE ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) find_package(Qt5Qml CONFIG REQUIRED) find_package(Qt5Gui CONFIG REQUIRED) find_package(Qt5Core CONFIG REQUIRED) find_package(Qt5Quick CONFIG REQUIRED) set(todo_SRCS main.cpp qml.qrc ) include(ExternalProject) ExternalProject_Add(QuickFlux PREFIX "${PROJECT_BINARY_DIR}/QuickFlux-build" GIT_REPOSITORY "https://github.com/benlau/quickflux.git" CMAKE_ARGS "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" "-DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}/QuickFlux" "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" ) link_directories("${PROJECT_BINARY_DIR}/QuickFlux/lib") include_directories("${PROJECT_BINARY_DIR}/QuickFlux/include") add_executable(todo ${todo_SRCS}) add_dependencies(todo QuickFlux) target_link_libraries(todo debug quickfluxd optimized quickflux) target_link_libraries(todo Qt5::Qml Qt5::Gui Qt5::Core Qt5::Quick)
How can I tell QT Creator that the library is present?
Had same issue, make sure to call registerQuickFluxQmlTypes()
I can run the
todo
demo just fine from within QT Creator. However, the editor keeps complaining thatQML module not found (QuickFlux)
. I am using CMake, and this is myCmakeLists.txt
:How can I tell QT Creator that the library is present?