wdezell
4th August 2009, 00:18
I'm continuing development of an app begun under Qt 4.3.3 (X11), now building using Qt 4.4.3 from source. I've just added a new, simple custom dialog ( Yes/No QButtonBox and a read-only QTextEdit). I created the dialog using Qt Creator 1.2.1 (source distro) choosing a subclassed-based approach. The resulting .h/.cpp class output files are nearly identical to what I've been coding by hand (Creator is great!).
My dialog is supposed to be Qt::ApplicationModal. Like other dialogs I've coded by hand, I invoke it similar to the following:
MyDialogClass *dialog = new MyDialogClass ( parent_ptr, other params );
dialog->exec ( );
The problem is that my dialog is exiting immediately (briefly visible) with a Reject (0) return value as if exec() never gets hooked into the application event loop. Stepping through with debug corroborates this. qDebug()'s sprinkled in my constructor show me that it's executing and receiving valid & expected params. When I drop my class over in a simple test project (invoked before qApp.exec() ) it displays fine with test data and returns the right Yes/No codes.
I'm a bit baffled and can't figure out what's wrong. Other custom dialogs still work perfect so it's me, not Qt. Any suggestions?
Bill
My dialog is supposed to be Qt::ApplicationModal. Like other dialogs I've coded by hand, I invoke it similar to the following:
MyDialogClass *dialog = new MyDialogClass ( parent_ptr, other params );
dialog->exec ( );
The problem is that my dialog is exiting immediately (briefly visible) with a Reject (0) return value as if exec() never gets hooked into the application event loop. Stepping through with debug corroborates this. qDebug()'s sprinkled in my constructor show me that it's executing and receiving valid & expected params. When I drop my class over in a simple test project (invoked before qApp.exec() ) it displays fine with test data and returns the right Yes/No codes.
I'm a bit baffled and can't figure out what's wrong. Other custom dialogs still work perfect so it's me, not Qt. Any suggestions?
Bill