From 369e479f48b0a542995781b13f86a19b45bfa662 Mon Sep 17 00:00:00 2001 From: Daniel Pizetta Date: Tue, 20 Feb 2018 17:25:31 -0300 Subject: [PATCH] Fix Typerror for python 2.7, in window.restoreState function --- example/example.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/example/example.py b/example/example.py index 14165dded..f864a0199 100644 --- a/example/example.py +++ b/example/example.py @@ -171,12 +171,9 @@ def main(): def read_settings(window): settings = QSettings('QDarkStyle', 'QDarkStyle Example') - pt = QPoint(200, 200) - sz = QSize(400, 400) - bt = QByteArray() - pos = settings.value('pos', pt) - size = settings.value('size', sz) - state = settings.value('state', bt) + pos = settings.value('pos', window.pos()) + size = settings.value('size', window.size()) + state = settings.value('state', window.saveState()) window.restoreState(state) window.resize(size) window.move(pos)