Results 1 to 2 of 2

Thread: expanding to the max. available space in a QStatusBar

  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default expanding to the max. available space in a QStatusBar

    Hi, I would like to know how I can make a Widget (QLabel) that has been added to the QStatusBar expand to occuby the entire free space. If I add permanent widgets to the right and an ordinary QLabel which is placed to the left of the statusbar, I have a lot of free space in between. Adding something like:
    Qt Code:
    1. QLabel::setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) );
    To copy to clipboard, switch view to plain text mode 
    did not help.

    I also would like to know, how to draw a border around the whole QStatusbar widget. Right now, I can ( to some extent ) define the borders of the individual QLabels inside the statusbar but not the whole statusbar itself.


    Thanx in advance
    momesana

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: expanding to the max. available space in a QStatusBar

    OK, I had not given a stretchfactor to QStatusBar::addWidget().
    With a stretchfactor of 1 it expands the widget the way I wanted.

Similar Threads

  1. space between lines in QTextEdit
    By Lele in forum Qt Programming
    Replies: 2
    Last Post: 19th September 2006, 13:05
  2. Replies: 3
    Last Post: 27th July 2006, 12:48
  3. how to find the free space on a drive
    By klaus1111 in forum Qt Programming
    Replies: 2
    Last Post: 14th July 2006, 10:25
  4. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11
  5. QTableWidget click in empty space results in error?
    By Giel Peters in forum Qt Programming
    Replies: 4
    Last Post: 21st January 2006, 00:07

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.