Results 1 to 8 of 8

Thread: Vertical QProgressBar Text Direction

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Feb 2013
    Posts
    3
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Vertical QProgressBar Text Direction

    Thanks! Just so I know though, what does setTextDirection do? All the descriptions I've read make it sound like it rotates the text, so I'm a bit confused.
    Edit: I've encountered a confusing problem when trying to override paintEvent in my subclass of QProgressBar. I've written
    Qt Code:
    1. void ProgressBar::paintEvent(QPaintEvent* event){
    2. this->QProgressBar::paintEvent(event);
    3. this->setTextVisible(false);
    4. QPainter p(this);
    5. //create QPointF location and QString q_pts; removed for brevity
    6. p.drawText(location, q_pts);
    7. }
    To copy to clipboard, switch view to plain text mode 
    I'm getting the warnings
    QWidget::repaint: Recursive repaint detected
    QPainter::begin: Widget painting can only begin as a result of a paintEvent.
    The code seems to work, so what are these warnings, and how do I fix them?
    Last edited by Pyral; 5th February 2013 at 03:24. Reason: updated contents, wanted to avoid double post

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.