Results 1 to 4 of 4

Thread: QWizard produces SIGILL

  1. #1
    Join Date
    Feb 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default QWizard produces SIGILL

    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:

    Qt Code:
    1. void
    2. MainWindow::_reconnect(void) {
    3.  
    4. QWizard wiz();
    5. ConnectionPage connectionPage(_project->getSettings());
    6. wiz.setWindowTitle("Title");
    7. wiz.addPage(&connectionPage);
    8.  
    9. if(wiz.exec() != QDialog::Accepted) {
    10. delete _project;
    11. _project = NULL;
    12. return;
    13. }
    14. }
    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QWizard produces SIGILL

    Qt Code:
    1. QWizard wiz();
    To copy to clipboard, switch view to plain text mode 
    is a declaration of a method called "wiz" taking no arguments and returning a QWizard object. You probably wanted this:
    Qt Code:
    1. QWizard wiz;
    To copy to clipboard, switch view to plain text mode 

    Your current code shouldn't even compile.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Feb 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QWizard produces SIGILL

    I'm sorry, indeed this does not compile and I meant
    Qt Code:
    1. QWizard wiz
    To copy to clipboard, switch view to plain text mode 

    I had tried to pass a pointer to the constructor to make MainWindow its parent (which changed nothing).

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QWizard produces SIGILL

    Change line #5 to:
    Qt Code:
    1. ConnectionPage *connectionPage = new ConnectionPage(_project->getSettings());
    To copy to clipboard, switch view to plain text mode 
    and adjust the next two lines accordingly.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QPainter::drawPixmap always produces black on windows?
    By spbots in forum Qt Programming
    Replies: 0
    Last Post: 18th September 2009, 16:42
  2. QTX4.4.3: Host build (-qvfb) produces unrunnable qpe
    By uberbubba in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 3rd April 2009, 03:08
  3. A QComboBox item produces segmentation fault when used
    By prykHetQuo in forum Qt Programming
    Replies: 3
    Last Post: 18th March 2009, 23:13
  4. Designer produces invalid code?
    By Tiansen in forum Qt Programming
    Replies: 7
    Last Post: 4th March 2008, 11:43
  5. QTextEdit produces incorrect html
    By ccf_h in forum Qt Programming
    Replies: 5
    Last Post: 8th February 2006, 15:18

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.