Render-artefacts when rotating a QGraphicsWidget
-
Hey,
i wrote my own text class, but it is rendered wrong:
!http://data.whosme.de/bug.png(bug.png)!
Where does those artefacts come from and how can i get it right? They only appear, when i rotate the text.
I am using a Graphicsscene and Graphicsview with OpenGL Viewport. This is my Text class:
@
class Text : public QGraphicsWidget
{
Q_OBJECTpublic:
Text();
~Text();void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *);
QString m_Text;
QColor m_Color;signals:
void pressed();
};
@@
Text::Text() : m_Color(QColor(255,255,255))
{
};Text::~Text() {
};void Text::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
{
painter->setPen( m_Color );
painter->drawText( boundingRect(), m_Text );
}
@For the rotation i used m_InformationText.setRotation(-90);
Without the rotation it works fine!