Results 1 to 4 of 4

Thread: Can QGraphicsItem's parent item be from another scene?

  1. #1
    Join Date
    Dec 2010
    Posts
    10
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Can QGraphicsItem's parent item be from another scene?

    Hi,
    there are two QGraphicsScene's in my application. Is it ok to use QGraphicsItem's from one scene as parents for QGraphicsItem's from another scene? I am not sure if that is correct.

    Thanks in advance!

  2. #2
    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: Can QGraphicsItem's parent item be from another scene?

    No, you can't do that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    cresta (25th September 2012)

  4. #3
    Join Date
    Dec 2010
    Posts
    10
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Can QGraphicsItem's parent item be from another scene?

    Thank you very much! Could you please point out corresponding notes in the Qt documentation?

  5. #4
    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: Can QGraphicsItem's parent item be from another scene?

    Quote Originally Posted by cresta View Post
    Could you please point out corresponding notes in the Qt documentation?
    No, I can't. You know where to look, you can try to find it yourself. For instance there is a statement that a child item is always painted on top of its parent. There is another statement somewhere stating that an event ignored by the item is forwarded not to its parent as it is with widgets but rather to an item "under" the original item. There is also a set of statements describing that transforming an item has effect on all its children.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QGraphicsItem independent of scene transformation
    By wagmare in forum Qt Programming
    Replies: 4
    Last Post: 19th January 2012, 08:47
  2. Replies: 7
    Last Post: 29th November 2010, 19:20
  3. Overload QGraphicsItem Move in Scene
    By D Cell in forum Newbie
    Replies: 2
    Last Post: 16th March 2010, 05:14
  4. Can I copy a QGraphicsItem on my scene?
    By JesperWe in forum Qt Programming
    Replies: 3
    Last Post: 12th February 2010, 21:21
  5. Replies: 1
    Last Post: 26th September 2006, 05:38

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.