mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
8 lines
231 B
Python
8 lines
231 B
Python
from PyQt5.QtCore import Qt
|
|
from PyQt5.QtGui import QIcon, QPixmap
|
|
|
|
|
|
def load_icon(path: str, size: int) -> QIcon:
|
|
pixmap = QPixmap(path)
|
|
return QIcon(pixmap.scaled(size, size, Qt.KeepAspectRatio, Qt.SmoothTransformation))
|