nomadscarecrow
23rd April 2010, 18:13
...
form_login l;
if (l.exec() == QDialog::Accepted)
{
tmain_form main_form;
main_form.show();
return a.exec();
}
...
Hi I'm using this code to show a login form on the main.cpp file.
When used in this way before the a.exec(), everything works fine.
But when I try this, the exec() is not executed in the usual way, the dialog is closed not waiting for user action.
tcontrol *control = new tcontrol();
if (control->login())
{
tmain_form main_form;
main_form.show();
return a.exec();
}
and login is just a method wrapping the first code, returning (l.exec() == QDialog::Accepted)
What is the difference?
I'm missing something?
Thanks in advance.
form_login l;
if (l.exec() == QDialog::Accepted)
{
tmain_form main_form;
main_form.show();
return a.exec();
}
...
Hi I'm using this code to show a login form on the main.cpp file.
When used in this way before the a.exec(), everything works fine.
But when I try this, the exec() is not executed in the usual way, the dialog is closed not waiting for user action.
tcontrol *control = new tcontrol();
if (control->login())
{
tmain_form main_form;
main_form.show();
return a.exec();
}
and login is just a method wrapping the first code, returning (l.exec() == QDialog::Accepted)
What is the difference?
I'm missing something?
Thanks in advance.