Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User vladest's Avatar
    Join Date
    Apr 2009
    Posts
    506
    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
    Nokia Developer Champion rahulvala's Avatar
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,293
    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 vladest's Avatar
    Join Date
    Apr 2009
    Posts
    506
    Hi rahulvala

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

  4. #4
    Registered User kamalakshan's Avatar
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998
    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 vladest's Avatar
    Join Date
    Apr 2009
    Posts
    506
    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
    Nokia Developer Champion rahulvala's Avatar
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,293
    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 vladest's Avatar
    Join Date
    Apr 2009
    Posts
    506
    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
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    It's really bad idea to make a blocking calls for 2-3 seconds. Use threads instead.

  9. #9
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    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. How to update the title of the item in listbox?
    By sundy10 in forum Symbian C++
    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 C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved