Results 1 to 4 of 4

Thread: QGraphicsItem problem - how to save items info ??

  1. #1
    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

    Exclamation QGraphicsItem problem - how to save items info ??

    I want to use a scene where I can add items at different levels.
    I have two different classes inherited from QGraphicsItem - CMacro, and CTile;
    I am adding both items in a scene with different ZValues.

    CMacro *macro = new CMacro(col,row,span);

    I am reading the position of macros from file, and I want to save the changed positions of macros in another file ? How do i do it ?
    I thought of using Qlist for saving a list of macros added.. but then how do i sync between the items in the list and the items in the scene ??

  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: QGraphicsItem problem - how to save items info ??

    Quote Originally Posted by aamer4yu View Post
    I want to use a scene where I can add items at different levels.
    I have two different classes inherited from QGraphicsItem - CMacro, and CTile;
    I am adding both items in a scene with different ZValues.

    CMacro *macro = new CMacro(col,row,span);

    I am reading the position of macros from file, and I want to save the changed positions of macros in another file ? How do i do it ?
    I thought of using Qlist for saving a list of macros added.. but then how do i sync between the items in the list and the items in the scene ??

    hey i found the solution.. problem was in using the QList... earlier i was using QList<CMacro> macroList;

    all i had to change was QList<CMacro*> macroList;


    BTW: how do i delete a threadd ?? is it disabled in this group ??

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QGraphicsItem problem - how to save items info ??

    Quote Originally Posted by aamer4yu View Post
    BTW: how do i delete a threadd ?? is it disabled in this group ??
    1. Don't shout.
    2. You can't delete threads yourself.
    3. When this really makes sense, you can ask one of the administrators to delete a thread.
    4. Pointing a problem and then writing that you found the solution doesn't qualify for deletion. If you post a solution, others might still benefit from the thread.

  4. #4
    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: QGraphicsItem problem - how to save items info ??

    Quote Originally Posted by wysota View Post
    1. Don't shout.
    2. You can't delete threads yourself.
    3. When this really makes sense, you can ask one of the administrators to delete a thread.
    4. Pointing a problem and then writing that you found the solution doesn't qualify for deletion. If you post a solution, others might still benefit from the thread.
    hey I am sorry..
    i didnt intend to shout, i just wanted to make it bold but was not aware it will be highlighted so much...

    ya i do agree others can still benefit

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.