Results 1 to 3 of 3

Thread: QGraphicsscene. How to ignore some item.

  1. #1
    Join Date
    Dec 2011
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Question QGraphicsscene. How to ignore some item.

    I want that when i call "collidingItems()" and "items" function in a qgraphicsscene, some item inside it are ignored and no processing because
    are only animation items

  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: QGraphicsscene. How to ignore some item.

    Qt Code:
    1. foreach(QGraphicsItem *item, collidingItems(...)){
    2. if(item == itemIWantToIgnore)
    3. continue;
    4. doSomethingWith(item);
    5. }
    To copy to clipboard, switch view to plain text mode 
    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. #3
    Join Date
    Dec 2011
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QGraphicsscene. How to ignore some item.

    thanks for solution!

Similar Threads

  1. How to ignore current item change in QListWidget?
    By GNU/Varan in forum Qt Programming
    Replies: 9
    Last Post: 19th July 2011, 19:42
  2. Rotate Item qgraphicsscene
    By pispipepe in forum Qt Programming
    Replies: 5
    Last Post: 28th July 2010, 20:05
  3. Moving an item in QGraphicsScene
    By prosass in forum Newbie
    Replies: 4
    Last Post: 28th March 2007, 14:21
  4. QWidget item in QGraphicsScene
    By IUnknown in forum Qt Programming
    Replies: 4
    Last Post: 4th November 2006, 00:05

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.