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 processingI 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:
@
void moveUiToDefaultTab(void)
{
qDebug()<<"Application UI moved to Default tab due to inactivity...";
m_idleTimer.stop();
m_idleTimer.start();
if (spMainWindow->mPages->currentIndex() == 0) return;
spMainWindow->mPages->setCurrentIndex(0);
}
}
@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]
-
Hi and welcome to devnet,
Maybe a silly question but, did you initialize mPages properly ?