Fix Typerror for python 2.7, in window.restoreState function

This commit is contained in:
Daniel Pizetta 2018-02-20 17:25:31 -03:00
parent 96590ea2d3
commit 369e479f48

View File

@ -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)