I have a slot in my 'MainWindow' which is called from another thread and is supposed to show a QWizard (to reconnect some socket-connection). This is the code for this slot:
void
MainWindow::_reconnect(void) {
QWizard wiz();
ConnectionPage connectionPage(_project->getSettings());
wiz.setWindowTitle("Title");
wiz.addPage(&connectionPage);
if(wiz.
exec() != QDialog::Accepted) { delete _project;
_project = NULL;
return;
}
}
void
MainWindow::_reconnect(void) {
QWizard wiz();
ConnectionPage connectionPage(_project->getSettings());
wiz.setWindowTitle("Title");
wiz.addPage(&connectionPage);
if(wiz.exec() != QDialog::Accepted) {
delete _project;
_project = NULL;
return;
}
}
To copy to clipboard, switch view to plain text mode
The problem is that when wiz.setWindowTitle (or any other method of QWizard) is called, a SIGILL occurs. The following is the trace:
0 ?? 0 0x4ec8356
1 QApplication::notify qapplication.cpp 4427 0x9abc60
2 QCoreApplication::notifyInternal qcoreapplication.cpp 731 0x6a2015f8
3 QCoreApplication::sendEvent qcoreapplication.h 215 0x1024e3a
4 QWidget::setWindowTitle qwidget.cpp 6005 0x9f1c6a
5 MainWindow::_reconnect mainwindow.cpp 273 0x40355e
...
When I change the code in the slot to show a QMessageBox (in a similar way) everything is fine.
What could cause this?
Bookmarks