Results 1 to 4 of 4

Thread: Status Bar in a SUB WINDOW.

  1. #1
    Join Date
    Dec 2006
    Location
    Bangalore, India
    Posts
    38
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Status Bar in a SUB WINDOW.

    Hi Folks,

    I'm trying to implement Status Bar in a SUB WINDOW.
    The problem is the expected messages are not displaying in the Status Bar.

    Constructor Code:

    Qt Code:
    1. QVBoxLayout *mainLayout = new QVBoxLayout;
    2.  
    3. QCheckBox checkbox = new QCheckBox(tr("Item #01"));
    4. checkbox->setToolTip( tr("This is the Tool Tip for Check Box") );
    5. checkbox->setStatusTip( tr("This is the status tip for Check Box ") );
    6. mainLayout->addWidget(checkbox);
    7.  
    8. QWidget *stBar = new QStatusBar(this);
    9. stBar->setBaseSize(100,200);
    10. mainLayout->addWidget(stBar);
    To copy to clipboard, switch view to plain text mode 


    In the above code I could see the Tool Tip but not the Status Bar.

    Any Help/Suggestions ..???

    Thanks in Advance..........
    Last edited by jpn; 27th July 2008 at 16:31. Reason: missing [code] tags
    WINNERS DON`T D DIFFERENT THINGS THEY D THINGS differently.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Status Bar in a SUB WINDOW.

    What do u see ? Can u show us a snapshot of the same ???
    Also the line -
    QWidget *stBar = new QStatusBar(this);
    shoudnt it be -
    QStatusBar *stBar = new QStatusBar(this);


    Also status bar is usually used with QMainWindow or its subclasses. If you want to show only some message, you cud very well use QLabel to show ur messages.

  3. #3
    Join Date
    Dec 2006
    Location
    Bangalore, India
    Posts
    38
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Status Bar in a SUB WINDOW.

    Thanks for your suggestion...
    I getting status Bar in the SUB WINDOW but no display messages.

    Note:
    I tried to upload the screen shot but I couldn't make it...
    WINNERS DON`T D DIFFERENT THINGS THEY D THINGS differently.

  4. #4
    Join Date
    Dec 2006
    Location
    Bangalore, India
    Posts
    38
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Status Bar in a SUB WINDOW.

    Could you please explain how to display a message about the WIDGET in a LABEL in which mouse cursor is pointing to ..?
    WINNERS DON`T D DIFFERENT THINGS THEY D THINGS differently.

Similar Threads

  1. Error: BadMatch --> what's it?
    By mattia in forum Newbie
    Replies: 4
    Last Post: 9th June 2008, 13:20
  2. QMain Window Problem
    By maveric in forum Qt Programming
    Replies: 1
    Last Post: 24th May 2008, 16:51
  3. Set a window as child at runtime
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 26th November 2007, 10:30
  4. Change shape of window / animate window
    By sabeesh in forum Qt Programming
    Replies: 3
    Last Post: 31st October 2007, 09:16
  5. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 09:41

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.