I made a QML button component and I used a component named ColorImage
for the icon. After searching for a way to change image color. I found out that Qt no longer support
Can someone help me figure out why it complains about ColorImage
not being a type when I try to launch?
Edit:
The imports in the file above:
import QtQuick 2.15
import QtQuick.Controls 2.15
CodePudding user response:
ColorImage is a Qt internal private component:
https://github.com/qt/qtdeclarative/blob/dev/src/quickcontrols2impl/qquickcolorimage.cpp
It doesn't appear to be supported for non-internal use.
If you really want to use it, try import QtQuick.Controls.impl 2.15
Note that ColorOverlay is available again in Qt 6.2 in Qt5Compat:
https://doc.qt.io/qt-6/qml-qt5compat-graphicaleffects-coloroverlay.html
It will eventually be replaced by Qt Quick MultiEffect: