Results 1 to 10 of 10

Thread: Qwizard crashed when created in a slot

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2007
    Posts
    16
    Thanks
    2
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy Qwizard crashed when created in a slot

    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
    Qt Code:
    1. bool QVistaHelper::handleWinEvent(MSG *message, long *result)
    2. {
    3. bool status = false;
    4. if (wizard->wizardStyle() == QWizard::AeroStyle) {
    5. status = winEvent(message, result);
    6. if (message->message == WM_NCCALCSIZE) {
    7. if (status)
    8. collapseTopFrameStrut();
    9. } else if (message->message == WM_NCPAINT) {
    10. wizard->update();
    11. }
    12. }
    13. return status;
    14. }
    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:

    Qt Code:
    1. void MyApp::testSlot()
    2. {
    3. NewProjectWizard* projwizard = new NewProjectWizard( this );
    4. projwizard->show();
    5. }
    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.
    Last edited by jpn; 15th January 2008 at 10:25. Reason: missing [code] tags

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.