Results 1 to 5 of 5

Thread: QDialog::exec() Segmentation fault

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2013
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QDialog::exec() Segmentation fault

    Hi all,
    I'm new, so please feel free to question me on the obvious stuff, and to recommend any relevant reading. Also, I'll do my best to supply any additional information that might help you help me. Please ask!

    I'm seeing a segmentation fault with the following backtrace:

    Qt Code:
    1. Program received signal SIGSEGV, Segmentation fault.
    2. 0x06fcc04f in QWidget::testAttribute_helper(Qt::WidgetAttribute) const ()
    3. from /usr/lib/qt4/lib/libQtGui.so.4
    4. (gdb) backtrace
    5. #0 0x06fcc04f in QWidget::testAttribute_helper(Qt::WidgetAttribute) const ()
    6. from /usr/lib/qt4/lib/libQtGui.so.4
    7. #1 0x06fd433f in QWidget::setAttribute(Qt::WidgetAttribute, bool) () from /usr/lib/qt4/lib/libQtGui.so.4
    8. #2 0x07301008 in QDialog::exec() () from /usr/lib/qt4/lib/libQtGui.so.4
    To copy to clipboard, switch view to plain text mode 

    Here's the code in question:
    Qt Code:
    1. QProgressDialog* m_pProgressDialog;
    2.  
    3. // Create the progress dialog.
    4. m_pProgressDialog = new QProgressDialog( "Operation in Progress", "&Cancel", 0, 100 );
    5. m_pProgressDialog->setWindowTitle( "Operation in Progress" );
    6. m_pProgressDialog->setFixedSize( 300, 100 );
    7. m_pProgressDialog->setModal( true );
    8.  
    9. // Connect to the cancel button.
    10. connect( m_pProgressDialog, SIGNAL( canceled() ), SLOT( CancelOperation() ) );
    11.  
    12. // Show the dialog and continue
    13. m_pProgressDialog->exec();
    To copy to clipboard, switch view to plain text mode 

    I've been Googling, reading your forums, debugging, and scratching my head for hours, and I can't figure out what to look for next. If you have any suggestions, I'd really appreciate it.
    Thanks!

    Qt4, Linux, g++
    Last edited by csavarese; 20th May 2013 at 22:59.

Similar Threads

  1. QDialog::exec() problem
    By zgulser in forum Newbie
    Replies: 1
    Last Post: 27th March 2012, 18:18
  2. QTcpsocket and QDialog::exec()
    By timewolf in forum Qt Programming
    Replies: 2
    Last Post: 25th August 2011, 08:27
  3. Replies: 9
    Last Post: 25th March 2011, 21:22
  4. QDialog.exec() exiting without calling QDialog::accept()
    By doggrant in forum Qt Programming
    Replies: 3
    Last Post: 2nd February 2011, 11:35
  5. QDialog problem with exec()
    By nomadscarecrow in forum Qt Programming
    Replies: 3
    Last Post: 23rd April 2010, 18:40

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
  •  
Qt is a trademark of The Qt Company.