SettingTab on MainWIndow from a timer
Currently my MainWIndow is set as a sharedpointer spMainWindow
setup as a
@QSharedPointer<MainWindow> spMainWindow= QSharedPointer<MainWindow>(new MainWindow(nullptr, &mSettings));@ //create our window to start processing
I have setup a timer that will reset the tab (hopefully) after x minutes of non use -- the slot is working, but on entrance to the tab function I get a seg-fault...
My basic function is this:
qDebug()<<"Application UI moved to Default tab due to inactivity...";
if (spMainWindow->mPages->currentIndex() == 0) return;
I believe I am crossing into a separate thread - (maybe not)
What is needed to correct my seg-fault?
[edit: added missing coding tags @ SGaist]
SGaist Lifetime Qt Champion last edited by
Hi and welcome to devnet,
Maybe a silly question but, did you initialize mPages properly ?