Results 1 to 4 of 4

Thread: Embedding QProgressBar in QStatusBar: Height issues

  1. #1
    Join Date
    May 2006
    Location
    Waterloo, ON
    Posts
    9
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Embedding QProgressBar in QStatusBar: Height issues

    When displaying a QProgressBar inside a QStatusBar, the status bar expands vertically to accomodate the progress bar, which I would like to avoid. I tried reducing the height of the progress bar in several ways, but it always grows back. This may be an issue with the Plastique style, which uses a lot of spacing around the text, and also forces the font to use a bold face.
    Is there any straight-forward way to reduce the vertical size of the progress bar?

    --Elad

  2. #2
    Join Date
    Feb 2006
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Embedding QProgressBar in QStatusBar: Height issues

    Did you try using style sheets?

    Try setting the max-height property in a style sheet.

  3. #3
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Embedding QProgressBar in QStatusBar: Height issues

    I used QProgressBar::setMaximumHeight() and it's working fine (see attachment)

    P.S. It's on Vista with Plastique style
    Attached Images Attached Images
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  4. The following user says thank you to faldzip for this useful post:

    elahav (11th February 2009)

  5. #4
    Join Date
    May 2006
    Location
    Waterloo, ON
    Posts
    9
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Embedding QProgressBar in QStatusBar: Height issues

    Thanks. I used setMaximumHeight() using the height of a label in the status bar, and it works well.

    --Elad

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.