Re: Problem with MyQDialog
and what is the code for myDialog ??
How have u handled the slots for OK ?
Re: Problem with MyQDialog
Maybe the slot is called twice?
Re: Problem with MyQDialog
Make sure the clicked() signal of the button is connected to the accept() slot of the form.
Re: Problem with MyQDialog
Quote:
Originally Posted by
jacek
Maybe the slot is called twice?
no, I've only one connect between pusbutton clicked signal and my slot addElement.
Re: Problem with MyQDialog
I've only one connect in myDialog constructor:
connect (myOkButton, SIGNAL(clicked()), frmMain, SLOT(addElement()) );
Re: Problem with MyQDialog
Quote:
Originally Posted by
stevey
Make sure the clicked() signal of the button is connected to the accept() slot of the form.
Do you think that I need of :
connect ( pbOkButtonMyDialog, SIGNAL(clicked()), myDialog, SLOT(accept())); ?
Re: Problem with MyQDialog
Quote:
Do you think that I need of :
connect ( pbOkButtonMyDialog, SIGNAL(clicked()), myDialog, SLOT(accept())); ?
yesss,,,
u need to connect the clicked signal of the button to the accept slot of the myDialog.
This connection is better written in the constructor of the myDialog
Re: Problem with MyQDialog
Quote:
Do you think that I need of :
connect ( pbOkButtonMyDialog, SIGNAL(clicked()), myDialog, SLOT(accept())); ?
Didn't I already say this?
Re: Problem with MyQDialog
Quote:
Originally Posted by
fruzzo
I've only one connect in myDialog constructor:
connect (myOkButton, SIGNAL(clicked()), frmMain, SLOT(addElement()) );
Does the dialog open when you comment out this line? Maybe you invoke exec() somewhere in that dialog's code?
Re: Problem with MyQDialog
Problem solved I leave some connection from designer so by code I duplicate it!
thanx to all!;)