PDA

View Full Version : QT - Navigational Control.



Girija
23rd September 2010, 10:33
Is there any navigational control like iPhone?
How to move from first class to second class and vice versa.

wysota
23rd September 2010, 10:58
I think you have to explain more what you want.

nish
23rd September 2010, 11:05
do you mean the button which slides the current view and bring up the new window?

Girija
23rd September 2010, 12:28
hi,
Actually I have two screens like first.cpp and second.cpp. Both have some control.

I want to move from first to second screen and also second to first using button activity.

I can move from first to second screen, but in vice versa does not work.

Please help me. How to solve this? Thanks in advance.

nish
23rd September 2010, 12:40
how do u move from first to second? can u show relevent code?

Girija
23rd September 2010, 13:43
Hi,
I am using the following function in first.cpp
first.cpp
#include second.h
void First :: getSecondScreen()
{
Second *sec= new Second();
sec->showFullScreen();
}

But I am struck-up with how to use in second.cpp.
Please help me.

Thanks in advance,

nish
23rd September 2010, 14:36
you are doing it wrong. take a QStackedWidget and add first() and second() as the child of it. then you can just call the setWidget() method of the stackwidget to change between the screens.