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. QtGraphicalEffects not available in Qt6 (qml)

QtGraphicalEffects not available in Qt6 (qml)

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlqt6effects
24 Posts 11 Posters 27.3k 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.
  • C Cyrille de Brebisson
    31 Mar 2021, 07:28

    Hello,

    Where do you see them? I am on windows, QT6.1.0-beta2 and I do not see them.
    Is there something extra that I need to install?

    Cyrille

    H Offline
    H Offline
    Hitokage
    wrote on 2 Apr 2021, 18:29 last edited by
    #21

    @Cyrille-de-Brebisson I am not sure but when I updated to that preview (tried even the current one) I can compile my code with them again. Using Linux. Not sure how can I check what modules are currently installed in my distribution.

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Hitokage
      wrote on 15 Nov 2021, 17:50 last edited by
      #22

      Sorry @Cyrille-de-Brebisson for the misleading information. It's a bit late but here is the right solution for all the people who need to use this module in QT6:

      git clone git://code.qt.io/qt/qtgraphicaleffects.git
      cd qtgraphicaleffects/
      git checkout 59ab3e11433a5157aac0f3af7c0d7fe70a373373
      cd ..
      ~/Qt/6.2.1/gcc_64/bin/qmake qtgraphicaleffects
      make
      cp qml/QtGraphicalEffects ~/Qt/6.2.1/gcc_64/qml/ -r
      

      So I cloned the module code, got a commit before the complete removal of the source files. Compiled and copied the result to the QT distribution directory.
      Then replace all the imports:

      import QtGraphicalEffects 1.0
      

      with

      import Qt5Compat.GraphicalEffects
      
      A 1 Reply Last reply 23 Feb 2022, 10:08
      3
      • H Hitokage
        15 Nov 2021, 17:50

        Sorry @Cyrille-de-Brebisson for the misleading information. It's a bit late but here is the right solution for all the people who need to use this module in QT6:

        git clone git://code.qt.io/qt/qtgraphicaleffects.git
        cd qtgraphicaleffects/
        git checkout 59ab3e11433a5157aac0f3af7c0d7fe70a373373
        cd ..
        ~/Qt/6.2.1/gcc_64/bin/qmake qtgraphicaleffects
        make
        cp qml/QtGraphicalEffects ~/Qt/6.2.1/gcc_64/qml/ -r
        

        So I cloned the module code, got a commit before the complete removal of the source files. Compiled and copied the result to the QT distribution directory.
        Then replace all the imports:

        import QtGraphicalEffects 1.0
        

        with

        import Qt5Compat.GraphicalEffects
        
        A Offline
        A Offline
        AM.B
        wrote on 23 Feb 2022, 10:08 last edited by
        #23

        @Hitokage Great, but

        import QtGraphicalEffects 1.0
        

        works fine & Qt5Compat.GraphicalEffects is not available for me.

        Note that in qml/QtGraphicalEffects directory there is no *.qml file exist, so for example I couldn't use OpacityMask in my code. In order to use it or any of the following components in your source code:

        • BrightnessContrast
        • Colorize
        • ColorOverlay
        • ConicalGradient
        • Desaturate
        • Displace
        • DropShadow
        • FastBlur
        • FastGlow
        • GammaAdjust
        • Glow
        • HueSaturation
        • LevelAdjust
        • LinearGradient
        • OpacityMask
        • RadialGradient
        • RectangularGlow
        • ThresholdMask

        you should also run these command which make QtGraphicalEffects ready to use in Qt6:

        $  find qtgraphicaleffects/src/effects/ -maxdepth 1 -name \*.qml -exec cp {} ~/Qt/<VERSION>/gcc_64/qml/QtGraphicalEffects \;
        $  cp qtgraphicaleffects/src/effects/private/ ~/Qt/<VERSION>/gcc_64/qml/QtGraphicalEffects -r
        
        1 Reply Last reply
        0
        • M mnesarco
          1 Dec 2020, 06:59

          Hi Friends,
          I have tried to use DropShadow from QtGraphicalEffects in a Qt6 app, but it is not found. Is there any specific module to be added in my cmake list? In Qt5.15.2 it works out of the box.

          Thanks in advance.

          A Offline
          A Offline
          Anuj Chaudhary
          wrote on 17 Oct 2022, 05:41 last edited by
          #24

          @mnesarco Hi mnesarco
          QtGraphicalEffects not available in Qt6 (qml) but we can use alternate way
          -> import Qt5Compat.GraphicalEffects

          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