Or this, as mentioned in my response:
void MyMainWindow::MyMainWindow(...)
{
...
QTimer::singleShot(0,
this,
SLOT(showSomeStuffLater
()));
}
void MyMainWindow::showSomeStuffLater()
{
...
}
// then
...
MyMainWindow *w = new MyMainWindow(...);
w->show();
...
void MyMainWindow::MyMainWindow(...)
{
...
QTimer::singleShot(0, this, SLOT(showSomeStuffLater()));
}
void MyMainWindow::showSomeStuffLater()
{
...
}
// then
...
MyMainWindow *w = new MyMainWindow(...);
w->show();
...
To copy to clipboard, switch view to plain text mode
The slot will be called as soon as the program returns to the event loop after executing show() (and whatever follows it).
Bookmarks