Qaterial
Qaterial copied to clipboard
ColorIcon.qml RangeError: Maximum call stack size exceeded
I have a weird error when using Colorize and ColorOverlay from Graphical effects:
file:///D:/Qt/5.15.12/msvc2019_64/qml/QtGraphicalEffects/Colorize.qml:0: RangeError: Maximum call stack size exceeded.
The error seems to come from a ColorIcon.qml I'm using in my application:
/**
* Copyright (C) Olivier Le Doeuff 2019
* Contact: [email protected]
*/
// Qt
import QtQuick 2.12
import QtGraphicalEffects 1.12 as QGE
import Qaterial 1.0 as Qaterial
Item
{
id: root
property color color: Qaterial.Style.colorTheme.primaryText
property alias icon: dummyImage.source
property real size: Qaterial.Style.smallIcon
property bool cached: true
readonly property real _implicitSize: icon.toString() ? size : 0
readonly property bool isImage: color.a === 0
implicitWidth: _implicitSize
implicitHeight: _implicitSize
Image
{
id: dummyImage
anchors.fill: parent
fillMode: Image.PreserveAspectFit
sourceSize: Qt.size(root.width, root.height)
visible: root.isImage && root.enabled
} // Image
QGE.ColorOverlay
{
anchors.fill: parent
source: dummyImage
readonly property color implicitColor: enabled ? root.color : Qaterial.Style.colorTheme.disabledText
color: Qt.rgba(implicitColor.r, implicitColor.g, implicitColor.b, implicitColor.a)
cached: root.cached
visible: !root.isImage
} // ColorOverlay
QGE.Colorize
{
anchors.fill: parent
source: dummyImage
hue: 0
saturation: 0
lightness: -0.2
cached: root.cached
visible: root.isImage && !root.enabled
} // Colorize
} // Item
Can anyone perhaps tell me how I can solve this issue? I'm not so familiar with Graphical effects...
This seems to be a qt error, maybe related to https://bugreports.qt.io/browse/QTBUG-27433 ?
But what does it mean? Do i generate too much Items? I have generated custom components based on Qaterial controls.
I have no idea without seeing any code, I won't have time to investigate at the moment.