25 lines
821 B
Python
25 lines
821 B
Python
import qtawesome as qta
|
|
from PyQt5 import QtGui, QtWidgets
|
|
|
|
from playtypus.mainwindow import MainWindow
|
|
from playtypus.resources import init_resources, cleanup_resources
|
|
|
|
|
|
def main():
|
|
"""Main"""
|
|
init_resources()
|
|
app = QtWidgets.QApplication([])
|
|
app.setWindowIcon(QtGui.QIcon(":/icon/playtypus.png"))
|
|
# Set up icon colours
|
|
palette = app.palette()
|
|
qta.set_defaults(color=palette.color(QtGui.QPalette.Active,
|
|
QtGui.QPalette.WindowText),
|
|
color_disabled=palette.color(QtGui.QPalette.Disabled,
|
|
QtGui.QPalette.WindowText))
|
|
# Create the main window and run the app
|
|
main_window = MainWindow()
|
|
main_window.show()
|
|
result = app.exec()
|
|
cleanup_resources()
|
|
return result
|