Qt 6.11 is out! See what's new in the release
blog
QtPdf - QML module not found
-
Hello everybody
I’m relatively new to Qt and QtQick in particular and am trying to render a PDF file in my qml application (OS: Win10, platform: Desktop). To achieve this I built QtPdf following the instructions in the Qt Wiki.
My project structure is as follows:|myProject |-- qml |-- QtQuick |-- Pdf qmldir plugins.qmltypes pdfplugin.dll [...] main.cpp main.qml someComponent.qml [...]I’m building with CMake and added the import path like it is described here:
set(QML_IMPORT_PATH ${CMAKE_SOURCE_DIR}/qml ${CMAKE_BINARY_DIR}/imports CACHE STRING "" FORCE)And I imported the module in my qml files using
import QtQuick.Pdf 5.15Sadly I get a “QML module not found” exception. Obviously I’m missing something important and would be grateful if someone could point me to it.
If something is unclear or you need more information or code snippets from any files, I'm happy to provide the information needed.