Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Save and restore state



  • Hi,

    My application use "saveState()" and "saveGemetry()". I have upgraded from Qt 5.7.0 to 5.15.0 and I'm facing problems with state and geometry restoration. I have checked the values saved with a diff tool and it seems that are different.
    The values are stored into an XML file using QXmlStreamWriter and converting the QByteArray returned by "saveState()" to Base 64 because wirting the QByteArray does not store the full value.

    Writing and restoring from scratch using version 5.15.0 works well but I don't want to force users to layout the widgets from scratch.

    Thanks,



  • I'm afraid there is no solution for your problem. The version argument doesn't actually do proper versioning so I'm afraid they are just incompatible.
    There are a number or tickets open regarding making saveState more flexible but some are >10 years old so I wouldn't count on this being resolved anytime (soon)



  • Hi,

    Thank you for your reply. So, I will layout application again.


Log in to reply