×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    506

    setWindowTitle() update title immediately

    Hi

    I'm trying to update window title immediately with construction like this:
    setWindowTitle(tr("bla-bla");
    qApp->processEvents();
    <some job>
    setWindowTitle(tr("bla-bla1");
    but this working only once due program runtime. I.e. I can see bla-bla only once. bla-bla1 shows every time

    what I'm doing wrong?

    Thanks
    Symbian & Qt developer. http://vladest.org

  2. #2
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: setWindowTitle() update title immediately

    Hi, vladest

    Actually where you are putting this line setWindowTitle() is very important accrording to that it will affect you runtime.
    Try this :
    Code:
    qApp->processEvents();
    <some job>
    setWindowTitle(tr("bla-bla");
    <some job>
    setWindowTitle(tr("bla-bla1");
    Best regards,
    RaHuL

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    506

    Re: setWindowTitle() update title immediately

    Hi rahulvala

    Unfortunately, this didnt help
    Symbian & Qt developer. http://vladest.org

  4. #4
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: setWindowTitle() update title immediately

    Couldnot interpret your problem. With the above code bla-bla will be shown and the updated with bla-bla1 on subsequent call to setWindowTitle(). Isn't that you want?

  5. #5
    Registered User
    Join Date
    Apr 2009
    Posts
    506

    Re: setWindowTitle() update title immediately

    Quote Originally Posted by kamalakshan View Post
    Couldnot interpret your problem. With the above code bla-bla will be shown and the updated with bla-bla1 on subsequent call to setWindowTitle(). Isn't that you want?
    Hi
    I want to see both bla-bla and bla-bla1, but see only bla-bla1
    Regards
    Symbian & Qt developer. http://vladest.org

  6. #6
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: setWindowTitle() update title immediately

    First you can not see both at the same time .
    And second when the title change it's so fast that you can not see it and finally you will see only bla-bla1.

    Best regards,
    RaHuL

  7. #7
    Registered User
    Join Date
    Apr 2009
    Posts
    506

    Re: setWindowTitle() update title immediately

    Well, between this two title changes a gap in 2-3 secs. So, too quick it is not my case
    Regards
    Symbian & Qt developer. http://vladest.org

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

    Re: setWindowTitle() update title immediately

    It's really bad idea to make a blocking calls for 2-3 seconds. Use threads instead.

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

    Re: setWindowTitle() update title immediately

    Test application
    Code:
    #include <QtGui>
    
    int main (int argc, char **argv)
    {
        QApplication app(argc, argv);
    
        QMainWindow win;
        win.show();
    
        win.setWindowTitle("1");
        app.processEvents();
        sleep(5);
        win.setWindowTitle("2");
    
        return app.exec();
    }

Similar Threads

  1. why is it that there is still no update for nokia 5800 update for product code 058315
    By jamonserrat in forum Series 40 & S60 Platform Feedback Archive
    Replies: 7
    Last Post: 2010-04-26, 10:01
  2. Replies: 10
    Last Post: 2009-11-11, 09:06
  3. How to update an application title in S90?
    By e5anbr in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-06-28, 11:22
  4. I want update title pane text?
    By tylin168 in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-02-07, 20:54
  5. I want update title pane text?
    By tylin168 in forum Symbian
    Replies: 2
    Last Post: 2004-02-06, 10:15

Posting Permissions

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