Persisting state
There are two ways to persist state and preference either with VLC variables or using Qt QSettings system. The rule of thumb is that settings & preferences should be stored using VLC variables (should we display CSD, should the application resize to the video size, etc), whereas application state (window position, is the playlist visible) should be stored in QSettings
Most settings & preferences will be loaded by MainCtx within the
MainCtx::loadPrefsprocedure. Settings may be loaded manually for specific use case using the usual VLCvar_inheritXXXXAPI on theqt_intf_tobject.Most states will be loaded by MainCtx within the
MainCtx::loadFromSettingsImpland saved withinMainCtxdestructor the QSetting instance is store in theqt_intf_tobject if there is a need to access outside MainCtx.