PDA

View Full Version : QGraphicsScene and matrix



Artturi.Sakari
18th June 2010, 10:26
Hi,

I have 6*6 items scene, and how to get four 3*3 matrix of this scene?

So I want to this kind off operation:
The scene is the following

[123456]
[123456]
[123456]
[aaabbb]
[aaabbb]
[aaabbb]

and I want to get four following matrixs

[123] [456]
[123] [456]
[123] [456]

[aaa] [bbb]
[aaa] [bbb]
[aaa] [bbb]

Is this possible to do?
Thanks for help!

aamer4yu
18th June 2010, 11:07
Do you mean placement of items or what ??

Artturi.Sakari
18th June 2010, 11:58
I have put 36 items to the scene so that it constructs one 6*6 matrix and I have given each of those elements own pos (postion).
I can rotate hole scene by using this->matrix.rotate() and one items by using this->scene()->itemsAt(pos)->rotate().

Now I want rote 3*3 matrix of the scene = 6*6 matrix, so that each rotated items of the 3*3 matrix gets a new position of the scene.

Is the any other way to this than create 3*3 matrix and rotate this created matrix?

SixDegrees
18th June 2010, 12:49
Read about groups, parents and children for GraphicsItems.