radek.z
18th January 2009, 10:40
Hi,
I can't find the reason, why my object disappearing during transformation around the XAxis.
I am showing here the short code which better expain what I mean.
When I use QTransform on the scene and rotate the view, then if i use high angle the QGraphicsRectItem disappeare.
Or if I make the view window height bigger, which anybody who would help me can try in this small app.
#include <QApplication>
#include <QGraphicsView>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QGraphicsScene scene;
scene.addRect(QRectF(0,0,100,100), QPen(), QBrush(QColor(Qt::red)));
QGraphicsView view(&scene);
view.show();
QTransform transform;
transform.rotate(80, Qt::XAxis);
view.setTransform(transform);
return app.exec();
}
I can't find the reason, why my object disappearing during transformation around the XAxis.
I am showing here the short code which better expain what I mean.
When I use QTransform on the scene and rotate the view, then if i use high angle the QGraphicsRectItem disappeare.
Or if I make the view window height bigger, which anybody who would help me can try in this small app.
#include <QApplication>
#include <QGraphicsView>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QGraphicsScene scene;
scene.addRect(QRectF(0,0,100,100), QPen(), QBrush(QColor(Qt::red)));
QGraphicsView view(&scene);
view.show();
QTransform transform;
transform.rotate(80, Qt::XAxis);
view.setTransform(transform);
return app.exec();
}