QML icon, text and button in listView, look like mosaic on Windows
-
wrote 25 days ago last edited by
Hi,
I am showing a custom listModel via qml. It's not complex. The only special thing, might be that the height might be 0 or regular height based on the visibility property. Things work well on Mac desktop. However it looks like mosaic on windows after press some button in the delegate. It will be normal again after hoverOn. It looks like below:
Code:Rectangle { id: root color: colorScheme.panelBackground() width: WIDTH + HALF_PADDING ListView { id: listview orientation: Qt.Vertical anchors.fill: parent model: listModel delegate: Rectangle { height: showInList ? row.height + PADDING : 0 width: WIDTH visible: showInList Row { id: row Image { id: leftIcon source: type == "Group" ? "qrc:/group.svg" : "qrc:/other.svg" } Column { spacing: SPACING Text { text: "ID:" + id color: colorScheme.activeContent() } Text { text: "Name:" + name color: colorScheme.activeContent() } Row { StudioControls.Button { icon.source: "qrc:/focus.svg" text: focused ? "Unfocus" : "Focus" onClicked: !focused ? root.requestToFocus(id, type) : root.requestToUnfocus(id, type) } StudioControls.Button { icon.source: "qrc:/import.svg" text: "Import" enabled: importedUuid.length === 0 onClicked: root.requestToLoad(id, type) } } } } } } }
1/1