Add window icon to PyQt5 application
This commit is contained in:
parent
7be14e3e8c
commit
d7a11c2af2
|
|
@ -18,7 +18,7 @@ from PyQt5.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout, QH
|
|||
QDialog, QGridLayout, QCheckBox, QComboBox, QFileDialog)
|
||||
from PyQt5.QtCore import Qt, QTimer, pyqtSignal, QThread, QRectF, QPropertyAnimation, QEasingCurve
|
||||
from PyQt5.QtGui import (QPainter, QColor, QPen, QFont, QLinearGradient,
|
||||
QRadialGradient, QBrush, QPainterPath, QFontDatabase)
|
||||
QRadialGradient, QBrush, QPainterPath, QFontDatabase, QIcon)
|
||||
import socketio
|
||||
import queue
|
||||
import subprocess
|
||||
|
|
@ -1006,6 +1006,12 @@ class TechDJMainWindow(QMainWindow):
|
|||
self.load_settings()
|
||||
|
||||
self.init_ui()
|
||||
|
||||
# Set window icon
|
||||
icon_path = os.path.join(os.path.dirname(__file__), 'icon.png')
|
||||
if os.path.exists(icon_path):
|
||||
self.setWindowIcon(QIcon(icon_path))
|
||||
|
||||
self.audio_engine.start_stream()
|
||||
self.fetch_library()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue