Results 1 to 8 of 8

Thread: Vertical QProgressBar Text Direction

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Jan 2016
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Vertical QProgressBar Text Direction

    I'm faced with the problem described in the initial question: call setTextDirection(QProgressBar::BottomToTop) makes no visual difference on the progress bar. The code is:
    Qt Code:
    1.  
    2. pb2->setOrientation(Qt::Vertical);
    3. pb2->setTextDirection(QProgressBar::BottomToTop);
    4. pb2->setRange(0, 100);
    5. pb2->setValue(20);
    6.  
    7. current_layout->insertWidget(current_index++,pb2);
    To copy to clipboard, switch view to plain text mode 
    The text on the resulting progress bar is stil oriented top-to-bottom...
    progressbar.png
    Question is how to get the text oriented bottom-to-top?

    Thank you in advance!

    UPDATE:
    This issue is caused by GTK+ style. The documentation says that some styles do not draw the text. This style seems to ignore the text direction option. From what I was able to test:
    - Motif, CDE and Plastique styles draw the text correctly;
    - Windows and Cleanlooks do not draw the text at all;
    - GTK+ is buggy - draws the text but ignores the text direction option.

    Hope this is helpful...
    Last edited by martynets; 22nd January 2016 at 20:25.

Similar Threads

  1. QProgressBar with custom text
    By smoon in forum Qt Programming
    Replies: 2
    Last Post: 10th May 2012, 15:44
  2. QProgressbar text format
    By jothy in forum Qt Programming
    Replies: 3
    Last Post: 4th August 2010, 18:02
  3. Replies: 2
    Last Post: 30th December 2008, 21:35
  4. Vertical text in a QTextDocument
    By Angelo Moriconi in forum Qt Programming
    Replies: 6
    Last Post: 7th February 2008, 05:30
  5. Vertical Orientation of Text.
    By ashukla in forum Qt Programming
    Replies: 9
    Last Post: 28th January 2008, 12:40

Tags for this Thread

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.