QSetting does not work in Windows.
-
In Linux Qt 5.4, QSetting works fine if splitter_5 saveGeometry & saveStor is terminated or restarted.
However, in Windows 8.1 Qt 5.4 it is the same source, but it does not work.
This is true even if Regedit is deleted from the Window. Is there a workaround? Thank you.
-
How is the relation between
QSplitter
andQSettings
in your case? If you need help, you need to provide the relevant code snippet. Or give us some more information.But in general:
Depending on the OS and the set FormatQSettings
will store the setting differently. Read the docs for QSettings and I think your problems should be solved. -
@beecksche I think what he means is that he stores the geometry of the widgets using saveGeometry (https://doc.qt.io/qt-5/qwidget.html#saveGeometry) and restores it later.
@Pada_ Did you check whether the geometry was stored correctly?
-
@Pada_ How to use QSetting ?
This, works everyWhere with m_splitter->saveState() :
void Settings::setSplit_dlg(const QByteArray &sizes) { m_settings -> beginGroup("splitters"); m_settings -> setValue("dlg_invoice", sizes ); m_settings -> endGroup(); }