×

Discussion Board

Results 1 to 5 of 5

Thread: Qt for Symbian

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    41

    Qt for Symbian

    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 of having only one screen.

    Thank you.
    Last edited by imran7313; 2010-01-13 at 04:44.

  2. #2
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Qt for Symbian

    remove w.show in main?
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    41

    Re: Qt for Symbian

    Hi,

    If I remove w.show(), then I won't be able to view the first screen itself i.e welcome screen. If this is the case How should I be able to procees to the next screen.

    Thank you.

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Qt for Symbian

    Code:
    #include <QApplication>
    #include <QMainWindow>
    #include <QTimer>
    
    int
    main (int argc,
          char **argv)
    {
        QApplication app(argc, argv);
        QMainWindow win1;
        QMainWindow win2;
    
        win1.setWindowTitle("Window 1");
        win2.setWindowTitle("Window 2");
    
        QTimer::singleShot(2000, &win2, SLOT(show()));
        QTimer::singleShot(2000, &win1, SLOT(hide()));
        QTimer::singleShot(4000, &app, SLOT(quit()));
    
        win1.show();
    
        return app.exec();
    }
    This is just an example to give an idea.
    Last edited by divanov; 2010-01-12 at 13:47.

  5. #5
    Registered User
    Join Date
    Dec 2009
    Posts
    41

    Re: Qt for Symbian

    Thank you so much

Similar Threads

  1. Qt for Symbian development resources
    By liuxg in forum [Archived] Qt General ( Qt技术)
    Replies: 55
    Last Post: 2011-01-26, 04:06
  2. kinetic scrolling
    By stalep in forum Nokia N9
    Replies: 10
    Last Post: 2009-12-08, 12:41
  3. Senior QT Client Developer (Dublin, Ireland)
    By marynyc in forum News and Announcements
    Replies: 0
    Last Post: 2009-06-02, 18:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×