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).
Possibly related posts:

7 comments
Does it use OpenGL hardware acceleration for QGLWidget viewport?
Hi, Wysota. QGLWidget uses hardware acceleration if your drivers support it, this screenshot shows that OpenGL is enabled on all views, so it uses QGLWidget for all viewports. But as you can see from the top-left view, my driver doesn’t support samplebuffers, so antialiasing has no effect.
No, no – I know QGLWidget uses hardware acceleration. I meant to ask if it uses OpenGL for QTransform effects.
QGLWidget uses OpenGL for everything.
looks awesome
i have an offtopic hint for you: if you use Alt-PrintScreen for your Screenshots, you don’t have to manually clip them
My problem with the current QMatrix/QGraphicsView is that I can’t scroll maps forever. Imagine a map of the earth and I scroll right, then I want to start seeing the portion of the map formally on the left.
For example,
http://mathworld.wolfram.com/CylindricalEquidistantProjection.html
If I scroll right on the map in the above link, I want to see Australia show up on the left. Is this possible with QTransform?
Nope, QGraphicsView can’t do spherical projection. It just (4.3) got support for perspective transformations… I guess the more features we add, the more possibilities you see
.
Comments on this entry are closed.