2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-26 03:38:25 +08:00

gui: save/restore main window geometry

This commit is contained in:
Sebastien Bourdeauducq 2016-02-14 23:08:14 +01:00
parent d81ce15869
commit cd732718ad

View File

@ -47,10 +47,14 @@ class MainWindow(QtGui.QMainWindow):
self.exit_request.set()
def save_state(self):
return bytes(self.saveState())
return {
"state": bytes(self.saveState()),
"geometry": bytes(self.saveGeometry())
}
def restore_state(self, state):
self.restoreState(QtCore.QByteArray(state))
self.restoreGeometry(QtCore.QByteArray(state["geometry"]))
self.restoreState(QtCore.QByteArray(state["state"]))
def main():