qtclient: implemented windows/widget state storage and restore