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:
Program received signal SIGSEGV, Segmentation fault.
0x06fcc04f in
QWidget::testAttribute_helper(Qt
::WidgetAttribute) const () from /usr/lib/qt4/lib/libQtGui.so.4
(gdb) backtrace
#0 0x06fcc04f in QWidget::testAttribute_helper(Qt::WidgetAttribute) const ()
from /usr/lib/qt4/lib/libQtGui.so.4
#1 0x06fd433f in QWidget::setAttribute(Qt::WidgetAttribute, bool) () from /usr/lib/qt4/lib/libQtGui.so.4
#2 0x07301008 in QDialog::exec() () from /usr/lib/qt4/lib/libQtGui.so.4
Program received signal SIGSEGV, Segmentation fault.
0x06fcc04f in QWidget::testAttribute_helper(Qt::WidgetAttribute) const ()
from /usr/lib/qt4/lib/libQtGui.so.4
(gdb) backtrace
#0 0x06fcc04f in QWidget::testAttribute_helper(Qt::WidgetAttribute) const ()
from /usr/lib/qt4/lib/libQtGui.so.4
#1 0x06fd433f in QWidget::setAttribute(Qt::WidgetAttribute, bool) () from /usr/lib/qt4/lib/libQtGui.so.4
#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:
// Create the progress dialog.
m_pProgressDialog
= new QProgressDialog( "Operation in Progress",
"&Cancel",
0,
100 );
m_pProgressDialog->setWindowTitle( "Operation in Progress" );
m_pProgressDialog->setFixedSize( 300, 100 );
m_pProgressDialog->setModal( true );
// Connect to the cancel button.
connect( m_pProgressDialog, SIGNAL( canceled() ), SLOT( CancelOperation() ) );
// Show the dialog and continue
m_pProgressDialog->exec();
QProgressDialog* m_pProgressDialog;
// Create the progress dialog.
m_pProgressDialog = new QProgressDialog( "Operation in Progress", "&Cancel", 0, 100 );
m_pProgressDialog->setWindowTitle( "Operation in Progress" );
m_pProgressDialog->setFixedSize( 300, 100 );
m_pProgressDialog->setModal( true );
// Connect to the cancel button.
connect( m_pProgressDialog, SIGNAL( canceled() ), SLOT( CancelOperation() ) );
// Show the dialog and continue
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++
Bookmarks