And what is the boundingRect() of the item?
Edit: I'm not able to reproduce the behaviour you observe using the following code. Can you change it so that it reproduces your problem?
#include <QtGui>
#include <QGLWidget>
int main(int argc, char **argv){
scene.setBackgroundBrush(Qt::blue);
view.setScene(&scene);
f.setPointSize(36);
item->setFont(f);
QTransform trans;
trans.rotate(60, Qt::YAxis);
item->setTransform(trans);
item->setOpacity(0.7);
view.show();
return app.exec();
}
#include <QtGui>
#include <QGLWidget>
int main(int argc, char **argv){
QApplication app(argc, argv);
QGraphicsView view;
QGraphicsScene scene;
scene.setBackgroundBrush(Qt::blue);
view.setScene(&scene);
view.setViewport(new QGLWidget);
QString txt = "Some text";
QGraphicsTextItem *item = scene.addText(txt);
QFont f;
f.setPointSize(36);
item->setFont(f);
item->setFlag(QGraphicsItem::ItemIsMovable);
item->setCacheMode(QGraphicsItem::ItemCoordinateCache);
QTransform trans;
trans.rotate(60, Qt::YAxis);
item->setTransform(trans);
item->setOpacity(0.7);
view.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks