Qtopia-interest Archive, December 2006
Hide and show of Multiple windows
Message 1 in thread
Hi
I have one screen/(Widget or window) with one button as OK .
I have one more screen with button BACK.
These two windows i created using designer .
The requirement is if i click OK it should open screen2.And IF i click
BACK it should come back to SCREEN1.
In my code it is happening but once i come back to screen1 and close
that screen the shell prompt is not returned .Means still some application
is running. If i close the Complete Frame buffer then the prompt is
returned.
In my code which i attached with this mails u can see what i did.
I did as
In my screen1*.cpp file i added the following
MainProcessingFormImpl *Main_Process_Screen; //This is screen 2.
This is declared as global variable.
And in the constructor function i added the following.
Main_Process_Screen = new MainProcessingFormImpl();
And in OK button click i am doing as follows
this->hide(); //It will hide first screen.
Main_Process_Screen->show(); //This will open second screen
And in the screen2 also i am doing same thing to come back .
I tryed somany alternatives but no use. In my application i need more than
10 windows.
I am just trying with two windows first.
In my code just see the files PatientInfoFormImpl.cpp
and MainProcessingFormImpl.cpp
In that the following functions.
void PatientInfoFormImpl::NP_PATIENT_OK_BUTTON_Clicked() // OK button
void MainProcessingFormImpl::MP_ANSINDEX_BUT_Clicked() //Like BACK Button
Thanks in advance
Regards,
Harsha
Message 2 in thread
Try QStackedWidget or QWidgetStack depending on what version you develop
with.
harshavardhanreddy mandeepala wrote:
> Hi
>
> I have one screen/(Widget or window) with one button as OK .
> I have one more screen with button BACK.
> These two windows i created using designer .
>
> The requirement is if i click OK it should open screen2.And IF i click
> BACK it should come back to SCREEN1.
> In my code it is happening but once i come back to screen1 and close
> that screen the shell prompt is not returned .Means still some application
> is running. If i close the Complete Frame buffer then the prompt is
> returned.
>
> In my code which i attached with this mails u can see what i did.
>
> I did as
> In my screen1*.cpp file i added the following
>
> MainProcessingFormImpl *Main_Process_Screen; //This is screen 2.
>
> This is declared as global variable.
>
> And in the constructor function i added the following.
> Main_Process_Screen = new MainProcessingFormImpl();
>
> And in OK button click i am doing as follows
>
> this->hide(); //It will hide first screen.
> Main_Process_Screen->show();
> //This will open second screen
>
> And in the screen2 also i am doing same thing to come back .
>
> I tryed somany alternatives but no use. In my application i need more
> than 10 windows.
> I am just trying with two windows first.
>
> In my code just see the files PatientInfoFormImpl.cpp
> and MainProcessingFormImpl.cpp
> In that the following functions.
>
> void PatientInfoFormImpl::NP_PATIENT_OK_BUTTON_Clicked() // OK button
> void MainProcessingFormImpl::MP_ANSINDEX_BUT_Clicked() //Like BACK Button
>
> Thanks in advance
>
> Regards,
> Harsha
--
[ signature omitted ]