How to dynamic split my custom window and save or restore those child
Unsolved
General and Desktop
-
Hi all Qters
Implementation dynamic window split like the following image:
so i want to save those child windows and when app start in next ,it can be restore like it,
My idea is like this:
I split the window is OK,and save the qobject-tree in my local xml ,just like this:
<?xml version="1.0" encoding="UTF-8" ?> <QWidget> <QSplitter id="1"> <QLineEdit>John</QLineEdit> </QSplitter> <QSplitter id="2"> <QLineEdit text='myusername'>Jane</QLineEdit> </QSplitter> <QSplitter id="3"> <CustomWidget code ='AAPL'>Apple Stock</CustomWidget> </QSplitter> </QWidget>
I want to parse this xml to create those children
Someone to help me?
Thank you! -
Hi!
You can start with http://doc.qt.io/qt-5/qxmlstreamreader.html#details -
If your idea is to restore the windows when you closed the application, you can try saving all the windows sizes and text entered using the QSettings and restore them when you open your application. You need to every piece of information using QSettings.
-
@dheerendra Hi
the follow codes://Implementation this function for every your custom object void save(QDataStream& out); void restore(QDataStream& in);