Browse Source

set qt metdata

master
Nils 4 years ago
parent
commit
6e84337d4f
  1. 13
      template/qtgui/mainwindow.py

13
template/qtgui/mainwindow.py

@ -46,12 +46,6 @@ from engine.config import * #imports METADATA
import engine.api as api #This loads the engine and starts a session.
from qtgui.designer.mainwindow import Ui_MainWindow #The MainWindow designer file is loaded from the CLIENT side
from qtgui.resources import *
#Construct QAppliction before constantsAndCOnfigs, which has the fontDB
QtGui.QGuiApplication.setDesktopSettingsAware(False) #We need our own font so the user interface stays predictable
QtGui.QGuiApplication.setDesktopFileName(PATHS["desktopfile"])
#qtApp imported from template.engine.start. Since Qt 5.15 or PyQt 5.15 you really can't have only one QApplication during program lifetime, even if you try to quit and del the first one.
from qtgui.constantsAndConfigs import constantsAndConfigs
class EventLoop(object):
@ -136,6 +130,9 @@ class MainWindow(QtWidgets.QMainWindow):
super().__init__()
self.qtApp = qtApp
self.qtApp.setWindowIcon(QtGui.QIcon(":icon.png")) #non-template part of the program
QtGui.QIcon.setThemeName("hicolor") #audio applications can be found here. We have no need for other icons.
logger.info("Init MainWindow")
#Callbacks. Must be registered before startEngine.
api.callbacks.message.append(self.callback_message)
@ -160,7 +157,11 @@ class MainWindow(QtWidgets.QMainWindow):
self.xFactor = 1 #keep track of the x stretch factor.
self.setWindowTitle(self.nsmClient.ourClientNameUnderNSM)
self.qtApp.setApplicationName(self.nsmClient.ourClientNameUnderNSM)
self.qtApp.setApplicationDisplayName(self.nsmClient.ourClientNameUnderNSM)
self.qtApp.setOrganizationName("Laborejo Software Suite")
self.qtApp.setOrganizationDomain("laborejo.org")
self.qtApp.setApplicationVersion(METADATA["version"])
self.setAcceptDrops(True)
self.debugScriptRunner = DebugScriptRunner(apilocals=locals()) #needs to have trueInit called after the session and nsm was set up. Which happens in startEngine.

Loading…
Cancel
Save