Ambiguous type detected. PdfStyle 6.0 is defined multiple times. [import]
-
I am working on a Qt Quick project with Qt for Python and tried to use QtQuick.Pdf, but I encountered an error. To troubleshoot, I created a completely new project and imported QtQuick.Pdf to test it, but I am still getting the same error: 'Ambiguous type detected. PdfStyle 6.0 is defined multiple times. [import].' This issue persists even in a brand new, empty project, so it seems to be a problem with the QtQuick.Pdf import in the Qt for Python setup.
-
@AirtonTassin Does the app actually work? These errors could come from the code model.
-
@jsulm
Yes, it's running normally when I don't import QtQuick.Pdf. As you can see, in the bottom left corner, there's an issue in mainWindow, and the message says, "The plugin ../qml/Pdf/pdfquickplugin.dll uses incompatible Qt library. (6.8.0) [release]." The same error occurs when I try to import QtWebView, with the message "../qml/QtWebView/qtwebviewquickplugin.dll uses incompatible Qt library. (6.8.0) [release]." -
@AirtonTassin said in Ambiguous type detected. PdfStyle 6.0 is defined multiple times. [import]:
Yes, it's running normally when I don't import QtQuick.Pdf
I mean: does it run if you include QtQuick.Pdf?
-
@jsulm Oh, I got it now, and yes, it's running normally. I can't say that all modules are working because I only tested it using PdfImage{}, and it worked perfectly. However, I noticed a slight performance drop, with Qt Creator showing a bit more lag than usual. Anyway, despite it working when running the application, "Item could not be created" still appears.
-
@AirtonTassin OK, then it is code model in the IDE producing "wrong" errors. This happens unfortunately.