Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-130588

QuickEffectsPrivate should be discoverable with find_package(Qt6 COMPONENTS QuickEffects REQUIRED) in CMakeLists.txt

    XMLWordPrintable

Details

    • All
    • b772c53f5 (dev)

    Description

      Component with MultiEffect can't be compiled to C++  using qmltc.

      There is QML component that uses MultiEffect (it's not really necessary to have it as root item):

      Effect.qml

      import QtQuick.Effects
      
      MultiEffect {
          //...
      }
      

      And project file that defines Qt Quick Extension plugin :
      CMakeList.txt

      ...
      qt_add_library(effect STATIC)
      qt_add_qml_module(effect
          URI effect
          VERSION 1.0
          QML_FILES Effect.qml
          ENABLE_TYPE_COMPILER
      )
      target_link_libraries(effect PRIVATE Qt6::Quick Qt6::QuickPrivate)
      ...
      

      Pay attention that ENABLE_TYPE_COMPILER is used to enable qmltc for Effect.qml.
      When trying to build it I get the following error:

      .qmltc/effect/effect.h:22:10: fatal error: 'private/qquickmultieffect_p.h' file not found
      #include "private/qquickmultieffect_p.h"
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      ninja: build stopped: subcommand failed.
      

      See standalone example effect.zip

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ulherman Ulf Hermann
            studiosus Vladimir Belyavsky
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes