PDA

View Full Version : show form2 from form1( form1 will hide)



jindoniit
5th July 2011, 09:32
i have 2 form(design by UI) . i want that when iclick button from form1 then form 2 will show and form1 hide

i try thid code but it is not work


QWidget * widgt= new QWidget();
Ui::Form2 ui;
ui.setupUi(widgt);

Form2 *detail = new Form2 (urlImage,index,widgt);
detail->show();

stampede
5th July 2011, 10:18
Typically, if you want something to be done on button click, you use signals & slots. I can't see anything like that in your code. Did you connect the "button from form1" to any slot ?