Results 1 to 3 of 3

Thread: Simple QGraphicsItem question

  1. #1
    Join Date
    Mar 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Simple QGraphicsItem question

    Hello,

    I want to save the position and orientation of a QGraphicsItem, so I can load it from file again. What would be the best way to do this? Am I obligated to store a whole transformation matrix for each item or is there a better way?

    Jeroen

  2. #2
    Join Date
    Aug 2008
    Posts
    60
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Simple QGraphicsItem question

    Not sure but you can...
    1) store the co-ordinates of the item in QByteArray and stroe QByteArray into file, on load read this file and set item's co-ordinates

    or

    2) use the QSettings to store the the item co-ordinates

  3. #3
    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: Simple QGraphicsItem question

    You can design ur own data... like angle, scale, pos.

Similar Threads

  1. Simple RegExp Question...
    By jared.carlson23 in forum Newbie
    Replies: 1
    Last Post: 4th July 2008, 14:10
  2. a simple noob question
    By wrproject in forum Newbie
    Replies: 1
    Last Post: 1st July 2008, 23:25
  3. QTextEdit simple question
    By Marcopolo in forum Qt Tools
    Replies: 4
    Last Post: 11th October 2007, 00:01
  4. simple question on Class-Members
    By mickey in forum General Programming
    Replies: 7
    Last Post: 4th February 2006, 22:37
  5. QTextEdit Qt4: simple question
    By TheKedge in forum Qt Programming
    Replies: 4
    Last Post: 18th January 2006, 12:03

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.