Results 1 to 2 of 2

Thread: access to widgets of statusbar

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Posts
    90
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default access to widgets of statusbar

    hi

    I added a qlabel to status bar in mainwindow constructor.
    how can i change the text of the qlabel in another functions ?


    Qt Code:
    1. QWidget *w = new QWidget();
    2. statusBar()->addWidget(w, 1);
    3. QLabel *l = new QLabel("Test Label");
    4. statusBar()->addWidget(l, 0);
    To copy to clipboard, switch view to plain text mode 

    regards
    navid

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: access to widgets of statusbar

    Pass a pointer to the other function/class and access it there.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. How to access Widgets created in Tab View
    By kapoorsudhish in forum Newbie
    Replies: 5
    Last Post: 23rd October 2009, 13:12
  2. how to access widgets values?
    By BalaQT in forum Qt Programming
    Replies: 4
    Last Post: 22nd August 2009, 12:06
  3. Access to widgets from a Dialog to another one
    By jean in forum Qt Programming
    Replies: 7
    Last Post: 7th August 2008, 09:42
  4. Replies: 2
    Last Post: 7th January 2007, 21:07
  5. Access widgets
    By Gayathri in forum Newbie
    Replies: 2
    Last Post: 17th November 2006, 14:37

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.