Compare commits
2 Commits
bda1478039
...
d6335e69bb
Author | SHA1 | Date | |
---|---|---|---|
d6335e69bb | |||
df6f0808a3 |
@ -6,6 +6,7 @@ import time
|
||||
import tempfile
|
||||
import hashlib
|
||||
import zlib
|
||||
import logging
|
||||
|
||||
import serial
|
||||
import serial.tools.list_ports
|
||||
@ -62,7 +63,8 @@ class QThread(QtCore.QThread):
|
||||
except Exception as exc:
|
||||
if self.error:
|
||||
self.error.emit(str(exc))
|
||||
raise
|
||||
# raise here causes windows builds to just die. ¯\_(ツ)_/¯
|
||||
logging.exception('Unhandled exception')
|
||||
|
||||
|
||||
class MainWindow(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow):
|
||||
@ -72,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()
|
||||
@ -270,9 +273,12 @@ 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__":
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
window = MainWindow(app=app)
|
||||
window.show()
|
||||
|
Loading…
x
Reference in New Issue
Block a user