PDA

View Full Version : QDialog



Maluko_Da_Tola
9th August 2010, 18:23
Hello,

I created two QDialogs, say dialog_A and dialog_B. Dialog_A has a button which, when clicked, should show dialog_B. For this purpose I defined a slot buttonAclicked(), declared in dialog_A as follows:

void Dialog_A::buttonAclicked(){
dialog_B dialo;
dialo.show();
}

After I defined this slot, I connected the button of dialog_A with it.
The code compiles fine, but when when dialog_A is created and I click the respective button, nothing happens (dialog_B is not shown).

Any suggestion why this is not working?
Cheers

Talei
9th August 2010, 18:32
Use:

QDialog dlg;
dlg.exec();

or


QDialog *dlg = new QDialog();
dlg->show();