add main and resources
This commit is contained in:
parent
a69844c20e
commit
1383d84b89
41
main.py
Normal file
41
main.py
Normal file
@ -0,0 +1,41 @@
|
||||
"""
|
||||
pyside6-rcc resources.qrc -o resources.py
|
||||
|
||||
"""
|
||||
import sys
|
||||
import platform
|
||||
import logging
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
from PyQt6.QtCore import QSettings
|
||||
from PyQt6.QtGui import QIcon
|
||||
|
||||
from fixtracks import fixtracks, info
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG, force=True)
|
||||
|
||||
# import resources # needs to be imported somewhere in the project to be picked up by qt
|
||||
|
||||
if platform.system() == "Windows":
|
||||
# from PySide6.QtWinExtras import QtWin
|
||||
myappid = f"{info.organization_name}.{info.application_version}"
|
||||
# QtWin.setCurrentProcessExplicitAppUserModelID(myappid)
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
app.setApplicationName(info.application_name)
|
||||
app.setApplicationVersion(str(info.application_version))
|
||||
app.setOrganizationDomain(info.organization_name)
|
||||
|
||||
# if platform.system() == 'Linux':
|
||||
# icn = QIcon(":/icons/app_icon")
|
||||
# app.setWindowIcon(icn)
|
||||
# Create a Qt widget, which will be our window.
|
||||
window = fixtracks.MainWindow()
|
||||
window.setGeometry(100, 100, 1024, 768)
|
||||
window.setWindowTitle("FixTracks")
|
||||
# window.setWindowFlags(Qt.FramelessWindowHint) # Remove window frame
|
||||
# window.setFixedSize(1024, 768)
|
||||
|
||||
window.show()
|
||||
|
||||
# Start the event loop.
|
||||
app.exec()
|
10
resources.qrc
Normal file
10
resources.qrc
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE RCC>
|
||||
<RCC version="1.0">
|
||||
<qresource prefix="icons">
|
||||
<file alias="help">icons/help.png</file>
|
||||
<file alias="quit">icons/quit.png</file>
|
||||
<file alias="close">icons/nix_close.png</file>
|
||||
<file alias="open">icons/nix_open.png</file>
|
||||
<file alias="settings">icons/settings.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
Loading…
Reference in New Issue
Block a user