Perspective transformations on a QGraphicsView

I don't have much to say this time, just wanted to share a screenshot after I changed the 40000 Chips demo a bit. I replaced the single horizontal rotation-slider with three ones, each controlling one axis or rotation for the view. QTransform is really easy to use, and with some twiddling (thumb up, pointing finger straight and your index finger pointing to the left), you can get some pretty amazing effects.


QGraphicsView view(&scene);

QTransform transform;
transform.rotate(45, Qt::XAxis);
transform.rotate(22.5, Qt::YAxis);

view.setTransform(transform);
view.show();

Setting one on a QGraphicsView works well, but there are still some rough edges that'll get fixed pretty soon. Anyway, this is what it looks like (interaction works just as well).


Transform - small


Blog Topics:

Comments