[bugfix] QSettings not loaded on setupUI because

application/organization name were not set
This commit is contained in:
Marcel Paffrath 2017-09-11 12:18:30 +02:00
parent 38a071ac5b
commit 1862b6d6e1

View File

@ -3076,9 +3076,10 @@ def create_window():
if app is None: if app is None:
app = QApplication(sys.argv) app = QApplication(sys.argv)
app_created = True app_created = True
app.setOrganizationName("QtPyLoT"); # set aplication/organization name, domain (important to do this BEFORE setupUI is called for correct QSettings)
app.setOrganizationName("Ruhr-University Bochum / BESTEC")
app.setOrganizationDomain("rub.de"); app.setOrganizationDomain("rub.de");
app.setApplicationName("RUB"); app.setApplicationName("PyLoT");
app.references = set() app.references = set()
# app.references.add(window) # app.references.add(window)
# window.show() # window.show()
@ -3110,18 +3111,14 @@ def main(args=None):
pylot_form.setWindowIcon(icon) pylot_form.setWindowIcon(icon)
pylot_form.setIconSize(QSize(60, 60)) pylot_form.setIconSize(QSize(60, 60))
splash.showMessage('Loading. Please wait ...') # set other App information
pylot_app.processEvents()
# set Application Information
pylot_app.setOrganizationName("Ruhr-University Bochum / BESTEC")
pylot_app.setOrganizationDomain("rub.de")
pylot_app.processEvents()
pylot_app.setApplicationName("PyLoT")
pylot_app.setApplicationVersion(pylot_form.__version__) pylot_app.setApplicationVersion(pylot_form.__version__)
pylot_app.setWindowIcon(app_icon) pylot_app.setWindowIcon(app_icon)
pylot_app.processEvents() pylot_app.processEvents()
splash.showMessage('Loading. Please wait ...')
pylot_app.processEvents()
# Show main window and run the app # Show main window and run the app
pylot_form.showMaximized() pylot_form.showMaximized()
pylot_app.processEvents() pylot_app.processEvents()