You are not asking stupid questions
I use QSettings and Qt 4.5.1
this is when i save the state
trdset.beginGroup("General");
trdset.setValue("STATE", saveState());
trdset.setValue("GEOM", saveGeometry());
trdset.endGroup();
trdset.sync();
trdset.beginGroup("General");
trdset.setValue("STATE", saveState());
trdset.setValue("GEOM", saveGeometry());
trdset.endGroup();
trdset.sync();
To copy to clipboard, switch view to plain text mode
loading the settings :
loadFunction (QSettings& trdset)
{
trdset.beginGroup("General");
QByteArray layout_data
= trdset.
value("STATE").
toByteArray();
bool b= restoreState(layout_data);
}
loadFunction (QSettings& trdset)
{
trdset.beginGroup("General");
QByteArray layout_data = trdset.value("STATE").toByteArray();
bool b= restoreState(layout_data);
}
To copy to clipboard, switch view to plain text mode
I have put some breakpoints in qdockarealayout.cpp and i can see that when i save the state the code is saveing the qplaceholderitems too (qplaceholderitems for the closed docked widgets )
qdockarealayout.cpp : (it is entering this if when i save the state)
else if (item.placeHolderItem != 0) {
stream << (uchar) WidgetMarker;
stream << item.placeHolderItem->objectName;
uchar flags = 0;
....
else if (item.placeHolderItem != 0) {
stream << (uchar) WidgetMarker;
stream << item.placeHolderItem->objectName;
uchar flags = 0;
....
To copy to clipboard, switch view to plain text mode
Bookmarks