Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Ambiguous type detected. PdfStyle 6.0 is defined multiple times. [import]

Ambiguous type detected. PdfStyle 6.0 is defined multiple times. [import]

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
7 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AirtonTassin
    wrote on last edited by
    #1

    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.

    ceabd5f8-052a-4030-94a3-7f0c5ee9ef84-image.png

    jsulmJ 1 Reply Last reply
    0
    • A AirtonTassin

      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.

      ceabd5f8-052a-4030-94a3-7f0c5ee9ef84-image.png

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @AirtonTassin Does the app actually work? These errors could come from the code model.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      0
      • jsulmJ jsulm

        @AirtonTassin Does the app actually work? These errors could come from the code model.

        A Offline
        A Offline
        AirtonTassin
        wrote on last edited by
        #3

        @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]."Captura de tela 2024-11-05 144108.png

        jsulmJ 1 Reply Last reply
        0
        • A AirtonTassin

          @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]."Captura de tela 2024-11-05 144108.png

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          A 1 Reply Last reply
          0
          • jsulmJ jsulm

            @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?

            A Offline
            A Offline
            AirtonTassin
            wrote on last edited by
            #5

            @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.

            Captura de tela 2024-11-06 092826.png

            jsulmJ 1 Reply Last reply
            0
            • A AirtonTassin

              @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.

              Captura de tela 2024-11-06 092826.png

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @AirtonTassin OK, then it is code model in the IDE producing "wrong" errors. This happens unfortunately.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              A 1 Reply Last reply
              1
              • jsulmJ jsulm

                @AirtonTassin OK, then it is code model in the IDE producing "wrong" errors. This happens unfortunately.

                A Offline
                A Offline
                AirtonTassin
                wrote on last edited by
                #7

                @jsulm Oh, okay, thank you for your help. We can close this thread and mark it as solved.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved