PDA

View Full Version : to add a dialog



deepusrp
17th May 2007, 17:00
I have an application, to that i have to add about in help. I designed different form say form2 and the original application is say form1.

void form1::helpAboutActivated()
{

}

I have this in my form1.ui.h file---- what code i have to add above so that i can avtivate that dialog form2.

I tried
void form1::helpAboutActivated()
{
form2 f2;
f2.exec();
}


but at the compilation time it is stating an error that form2 is not declared under scope...


Please tell me what to do

wysota
17th May 2007, 17:04
Did you include a proper file defining form2?

deepusrp
18th May 2007, 11:12
to where i have to include...

i was having my application opened in qt designer. I selected the new dialog using File->new

then i added what i wanted to that new form form2. now i want to open that form2 from an event occured in form1

wysota
18th May 2007, 11:30
Include it in the file where you reference "form2".