1
0

external plugins: add methods to read image files

This commit is contained in:
ThomasV
2024-04-07 11:17:22 +02:00
parent 858d999d31
commit ad774a49be
2 changed files with 12 additions and 0 deletions

View File

@@ -1237,6 +1237,10 @@ def icon_path(icon_basename: str):
def read_QIcon(icon_basename: str) -> QIcon:
return QIcon(icon_path(icon_basename))
def read_QIcon_from_bytes(b: bytes) -> QIcon:
qp = QPixmap()
qp.loadFromData(b)
return QIcon(qp)
class IconLabel(QWidget):
HorizontalSpacing = 2