QML MultiEffect garbled error message
Solved
QML and Qt Quick
-
In my qml file, I write
TreeView { id: treeView property int lastIndex: -1 ... delegate: TreeViewDelegate { id: viewDelegate ... MultiEffect { id: iconOverlay anchors.fill: arrowIcon source: arrowIcon colorization: 1.0 brightness: 1.0 colorizationColor: { const isTable = viewDelegate.index === treeView.lastIndex && !viewDelegate.hasChildren; if (isTable) { return Qt.lighter(Colors.database, 3) } const isExpanded = viewDelegate.expanded && viewDelegate.hasChildren; return isExpanded ? Colors.color2 : Colors.database } } ... } ... }
where in
Colors.qml
I definedimport QtQuick pragma Singleton QtObject { ... readonly property color database: "#383737" ... }
When I run my program, the debugger shows error messages like
QML MultiEffect: ��ê�������Ǹ�����ͬ������Ŀ��
or
QML MultiEffect: ???ê???????????????????????I have tried to link both Quick and QuickControls2 but the problem still occurs. I'm using Qt 6.8.0 with MSVC 2022 (AMD64).
-