Thanks, the issue is I don't know how to do that? For example if I have a dialog set in my mainwindow.h as
private:
Ui::MainWindow *ui;
/*windows that can be drawn permently*/
GameviewDialog *mGameViewDialog;
private:
Ui::MainWindow *ui;
QSettings *appSettings;
/*windows that can be drawn permently*/
GameviewDialog *mGameViewDialog;
To copy to clipboard, switch view to plain text mode
how would I tell it to save mGameViewDialog? How would I ajust the below to point at that dialog?
appSettings->setValue("state/mainWindowState", saveState( ) );
appSettings->setValue("geometry/mainWindowGeometry",saveGeometry( ) );
appSettings->setValue("state/mainWindowState", saveState( ) );
appSettings->setValue("geometry/mainWindowGeometry",saveGeometry( ) );
To copy to clipboard, switch view to plain text mode
I can't find this documented anywhere or any tutorials that tell you how to do it.
Thanks
should add I've tried
appSettings->setValue("geometry/ViewGeometry",GameViewDialog->saveGeometry( ) );
appSettings->setValue("geometry/ViewGeometry",GameViewDialog->saveGeometry( ) );
To copy to clipboard, switch view to plain text mode
then called to restore, however I get a segmentation fault
mGameViewDialog->restoreGeometry( geometryData );
mGameViewDialog->restoreGeometry( geometryData );
To copy to clipboard, switch view to plain text mode
Added after 59 minutes:
Thankyou I've solved it. I was calling the loadgui function from my mainwindow constructor. However I was doing so before setting up the dialogs. eg
/*lets restore*/
GUI_loadsettings( );
mGameDialog = new GameDialog( this );
/*lets restore*/
GUI_loadsettings( );
mGameDialog = new GameDialog( this );
To copy to clipboard, switch view to plain text mode
rather than
mGameDialog = new GameDialog( this );
/*lets restore*/
GUI_loadsettings( );
mGameDialog = new GameDialog( this );
/*lets restore*/
GUI_loadsettings( );
To copy to clipboard, switch view to plain text mode
:s
Bookmarks