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
this->QProgressBar::paintEvent(event);
this->setTextVisible(false);
//create QPointF location and QString q_pts; removed for brevity
p.drawText(location, q_pts);
}
void ProgressBar::paintEvent(QPaintEvent* event){
this->QProgressBar::paintEvent(event);
this->setTextVisible(false);
QPainter p(this);
//create QPointF location and QString q_pts; removed for brevity
p.drawText(location, q_pts);
}
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?
Bookmarks