PDA

View Full Version : Multiple form management?



kpmsivachand
30th January 2009, 02:39
Hi !

i was created two forms using qt designer(4.4) namely form1,form2. form1 having the next push button, while pressing it i need to go next form (form2). Like wise form2 having the back push button, while pressing it i need to go previous form(form1).

In vb,


nextcmd_clicked()
form1.hide()
form2.show()
end sub

previouscmd_clicked()
form2.hide()
form1.show()
end sub


Like wise i need to achieve in QT. Please help me out.... Any small hint can be appreciate....

Advance Thanks :)

kpmsivachand
30th January 2009, 09:21
Expert please help me out .... :(

caduel
30th January 2009, 16:54
You could create a QObject-derived FormManager.
This could create the Form1 and attach to its "showForm2" signal. In the connected slot, hide form1 and create (if needed) form2 and show that. Connect to the showForm1 signal upon creation.

Before you do that: consider why you would want to do that. You could (should?) create a wizard with QWizard instead.

HTH

kpmsivachand
31st January 2009, 07:40
You could create a QObject-derived FormManager.
This could create the Form1 and attach to its "showForm2" signal. In the connected slot, hide form1 and create (if needed) form2 and show that. Connect to the showForm1 signal upon creation.

Before you do that: consider why you would want to do that. You could (should?) create a wizard with QWizard instead.

HTH

Thank you caduel! I will work out with QWizard..... Thanks once again!