This commit is contained in:
Paul Ebbers 2024-11-07 23:31:50 +01:00
parent 036f1919f2
commit 23df9a8686

View File

@ -77,9 +77,12 @@ def deserializeIcon(iconPixmaps):
# pxm.loadFromData(
# QtCore.QByteArray.fromBase64(QtCore.QTextCodec.codecForName("UTF-8").fromUnicode(statePixmap))
# )
t = QtCore.QTextStream(statePixmap)
t.setEncoding(QtCore.QStringDecoder.Encoding.Utf8)
pxm.loadFromData(t.readAll())
# t = QtCore.QTextStream(bytearray(statePixmap))
# t.setEncoding(QtCore.QStringDecoder.Encoding.Utf8)
# pxm.loadFromData(t.readAll())
encoded = statePixmap.encode("utf-8")
array = bytearray(encoded)
pxm.loadFromData(array)
ico.addPixmap(pxm, mode, state)
return ico