Closed ic005k closed 1 year ago
Or, can you write a demo using QQuickWidget? Hard work!
To solve the problem, just add this code:
ui->quickWidget->engine()->addImportPath(":/");
Thanks again, perfect.
Thank you @ic005k, i'm glad you solved the problem!
First of all thank you for doing such a great job.
When I load "PdfPage.qml" into a quickWidget, it always reports the following error:
qrc:/sample/PdfPage.qml:10:1: module "it.ltdev.qt.qml.components" is not installed The import it.ltdev.qt.qml.com 1.0 as LTDev ponents
I tried to install the module using the following method: engine-> AddImportPath: ("/"); or Qputenv: (" QML2_IMPORT_PATH ", "/"); It still doesn't work.
However, when I used QQmlApplicationEngine to load "PdfPage.qml", everything worked perfectly.
Do you have any suggestions, please? Thank you very much!
Also, can simplify the use of this module ponents "it.ltdev.qt.qml.com"? I found it to have a lot of hierarchical directories, which was a little confusing.Thanks again.