Reg: Open Parent window when push button clicked in child window
-
Hi All,
I am new to QT and manage to make an application with 3 windows. I am able to navigate forward 1->2->3 or 1->3.
But if i wanna go back i.e from 3->1 window how do i do it??
How do i connect a pushbutton in 3rd window to show the 1st window.Any help would be appreciated. I tried to search the forum but didnt succeed to find soln.
-
-
Hi,
This sounds like something where you can use "QWizard":http://qt-project.org/doc/qt-5.0/qtwidgets/qwizard.html
Hope it helps
-
you can emit signals from each window to target window
so that you can call hide()/show() in the slots of respective windows -
i also want the same thing but as i used the show()/hide then it will hide the main window but it will not showing new window.
the new window which i want to show that should be having diff .cpp , .h file and different .ui
so as we press the push button of main window that new window should open ..
please help me out..
thanks in advance -
also one i got from internet
the link i will post
http://hxr99.blogspot.in/2011/12/how-to-call-ui-design-form-with.html
and from theire i got zip file of that
link is : http://www.mediafire.com/download/fbim2vlo9rbpf1p/AboutWin.zip
but that is also not working -
[quote author="ndv472" date="1395922437"]i also want the same thing but as i used the show()/hide then it will hide the main window but it will not showing new window.
void nn_adc_trial::on_pushButton_clicked()
{
QWidget *new_window=new QWidget ; new_window->show(); hide ();
} [/quote]as per your code definitely it will not show the mainwindow due to hide() but would show new window.
[quote author="ndv472" date="1395922437"]the new window which i want to show that should be having diff .cpp , .h file and different .ui
so as we press the push button of main window that new window should open ..[/quote]Make your own C++ Class(.cpp/.h) for New widget (inherits QWidget ) that you want to show.
Edited:- Try to give your code with proper indentation on the forum so it can be readable.
-
[quote author="Vishva" date="1382966771"]!http://www.thedazzlersinc.com/source/wp-content/uploads/2012/06/flow.png(img)![/quote]
Why dont you use stack concept in Qt, using push and pop for showing parent and child.