[Qt-interest] Multiple screen.
Ulf-Alexander v. Ceumern-Lindenstjerna
ceumern at vrmagic.com
Wed Jan 13 11:03:27 CET 2010
Either destroy W before showing A, or call W.hide(). This would mean you
have to move A out of W, but I am sure you will figure it out.
Cheers, Ulf
> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> bounces at trolltech.com] On Behalf Of Mohammed Imran B
> Sent: Wednesday, January 13, 2010 5:07 AM
> To: qt-interest at trolltech.com
> Subject: [Qt-interest] Multiple screen.
>
> Hi,
>
> I have written a code which look like this.
>
> //welcome.h
> class Welcome
> {}
>
> //welcome.cpp ...////some functions in this
>
> //Add.h
> class ADD
> {}
>
> //Add.cpp ...//some functions in this
>
>
> //main.cpp
> main()
> {
> QApplication a(argc, argv);
> welcome W;
> W.show();
> return a.exec();
> }
>
> I am calling "Add A.show();" in Welcome.cpp.
>
> Now when I do this I have two screens: One is from welcome and another
> from Add.
> What I wanted is when I call the second screen "Add A.show();". The
> previous screen ( welcome ) should get closed. This is what the
problem
> is, I could not close the previous screen.
>
> Can somebody suggest me how do I accomplish this.
>
> Thank you.
More information about the Qt-interest-old
mailing list