I'm trying to use the QWizard class introduced in Qt4.3.0 but whenever I try to create my QWizard derived class in a slot, I get an access violation deep in the Qt library:
qwizard_win.cpp
bool QVistaHelper::handleWinEvent(MSG *message, long *result)
{
bool status = false;
if (wizard->wizardStyle() == QWizard::AeroStyle) {
status = winEvent(message, result);
if (message->message == WM_NCCALCSIZE) {
if (status)
collapseTopFrameStrut();
} else if (message->message == WM_NCPAINT) {
wizard->update();
}
}
return status;
}
bool QVistaHelper::handleWinEvent(MSG *message, long *result)
{
bool status = false;
if (wizard->wizardStyle() == QWizard::AeroStyle) {
status = winEvent(message, result);
if (message->message == WM_NCCALCSIZE) {
if (status)
collapseTopFrameStrut();
} else if (message->message == WM_NCPAINT) {
wizard->update();
}
}
return status;
}
To copy to clipboard, switch view to plain text mode
It appears as if the wizard pointer is no longer valid. Here is my calling code:
void MyApp::testSlot()
{
NewProjectWizard* projwizard = new NewProjectWizard( this );
projwizard->show();
}
void MyApp::testSlot()
{
NewProjectWizard* projwizard = new NewProjectWizard( this );
projwizard->show();
}
To copy to clipboard, switch view to plain text mode
This code works fine anywhere but in a connected slot. Has anyone else experienced this? Could someone else test this and see if I'm crazy? I have Qt 4.3.0 compiled for Microsft Visual Studio 2005 installed and I'm running Windows XP, not Vista. Maybe Qt4.3.1 fixes this problem but I didn't see anything in the change log. Any help would be appreciated, thanks.
Bookmarks