1
0
mirror of https://github.com/borg-qt/borg-qt.git synced 2024-07-02 05:50:47 +02:00
borg-qt/borg_qt/main_window.py
Andreas Zweili ccfbc843f1 move the window title after the loadUi method
otherwise the title get's overwritten again
Found here in the comments:
https://stackoverflow.com/a/32097504/7723859
2019-01-26 10:38:30 +01:00

26 lines
731 B
Python

import os
from PyQt5 import uic
from PyQt5.QtCore import QCoreApplication
from PyQt5.QtWidgets import QMainWindow
from config import Config
class MainWindow(QMainWindow):
def __init__(self, *args, **kwargs):
super(MainWindow, self).__init__(*args, **kwargs)
QCoreApplication.setApplicationName("borg-qt")
dir_path = os.path.dirname(os.path.realpath(__file__))
ui_path = os.path.join(dir_path + '/static/UI/MainWindow.ui')
uic.loadUi(ui_path, self)
self.setWindowTitle("Borg-Qt")
self.config = Config()
self.action_settings.triggered.connect(self.show_settings)
def show_settings(self):
self.config.set_form_values()
self.config.exec_()