From d6335e69bbc2c4825792277c159389117ce96066 Mon Sep 17 00:00:00 2001 From: Piotr Dobrowolski Date: Tue, 28 Aug 2018 15:10:35 +0200 Subject: [PATCH] Resize main window when toggling expert mode --- luftdaten-tool.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/luftdaten-tool.py b/luftdaten-tool.py index 47d702e..4e050e6 100644 --- a/luftdaten-tool.py +++ b/luftdaten-tool.py @@ -74,6 +74,7 @@ class MainWindow(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow): def __init__(self, parent=None, app=None): super(MainWindow, self).__init__(parent) + self.setWindowFlags(QtCore.Qt.Dialog) # FIXME: dirty hack to solve relative paths in *.ui oldcwd = os.getcwd() @@ -272,6 +273,8 @@ class MainWindow(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow): @QtCore.Slot() def on_expertModeBox_clicked(self): self.expertForm.setVisible(self.expertModeBox.checkState()) + self.centralwidget.setFixedHeight(self.centralwidget.sizeHint().height()) + self.setFixedHeight(self.sizeHint().height()) if __name__ == "__main__":