QtGraphicalEffects not available in Qt6 (qml)
-
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
wrote on 2 Apr 2021, 18:29 last edited by@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.
-
wrote on 15 Nov 2021, 17:50 last edited by
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
-
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
wrote on 23 Feb 2022, 10:08 last edited by@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 useOpacityMask
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
-
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.
wrote on 17 Oct 2022, 05:41 last edited by@mnesarco Hi mnesarco
QtGraphicalEffects not available in Qt6 (qml) but we can use alternate way
-> import Qt5Compat.GraphicalEffects