Opacity Mask on QT 4.8
-
Hello Friends!
Is there any way to create a mask like the link below only in Qt 4.8 in QML?
https://doc.qt.io/qt-5/qml-qtgraphicaleffects-opacitymask.htmlThank you all!
-
Hi,
Do you mean use QGraphicalEffects in Qt 4 ?
-
Hello @SGaist!
Not exactly, I want to replicate the opacity mask effect on Qt4.
I tried a few ideas, but none of them worked as the effect shown on the link.@SGaist said in Opacity Mask on QT 4.8:
Do you mean use QGraphicalEffects in Qt 4 ?
-
What did you try ?
You can use https://doc.qt.io/archives/qt-4.8/qml-shadereffectitem.html in 4.8 and adapt the code from https://github.com/qt/qtgraphicaleffects/blob/24f12a9466ecaa4173fb46196199f0eed9374750/src/effects/shaders/opacitymask.frag
-
What did you try ?
You can use https://doc.qt.io/archives/qt-4.8/qml-shadereffectitem.html in 4.8 and adapt the code from https://github.com/qt/qtgraphicaleffects/blob/24f12a9466ecaa4173fb46196199f0eed9374750/src/effects/shaders/opacitymask.frag
Hi @GrecKo !
Sorry for the delay in answering, I was not seeing this issue until yesterday. Anyway, I couldn't reproduce the effect as you suggested, but I appreciate the suggestion.
To remedy the situation without delay, at least until the migration to Qt5, I used background image clippings to create the necessary effect. It was hard work with the part of the image positioning (they were 6 backgrounds and for each background were 6 cutouts), but it worked.
Thank you!