Results 1 to 4 of 4

Thread: QGraphicsScene and matrix

  1. #1

    Default QGraphicsScene and matrix

    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!

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsScene and matrix

    Do you mean placement of items or what ??

  3. #3

    Default Re: QGraphicsScene and matrix

    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?

  4. #4
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: QGraphicsScene and matrix

    Read about groups, parents and children for GraphicsItems.

Similar Threads

  1. need help with creating an m x n matrix
    By Petr_Kropotkin in forum General Programming
    Replies: 3
    Last Post: 3rd April 2010, 15:18
  2. matrix for QBrush
    By navi1084 in forum Qt Programming
    Replies: 5
    Last Post: 5th February 2010, 11:27
  3. Dot Matrix Printer
    By estanisgeyer in forum Qt Programming
    Replies: 3
    Last Post: 18th December 2009, 19:30
  4. in QGraphicsScene matrix of other QGraphicsScene
    By Noxxik in forum Qt Programming
    Replies: 5
    Last Post: 15th February 2009, 17:27
  5. Image processing via matrix
    By jones.79 in forum Qt Programming
    Replies: 10
    Last Post: 22nd September 2008, 00:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.