Results 1 to 4 of 4

Thread: QGraphicItem is not recognized

  1. #1
    Join Date
    Jul 2008
    Location
    Munich
    Posts
    73
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy QGraphicItem is not recognized

    I have a QWidget, inside it a QGraphicsView, inside it QGraphicsScene, inside it QGraphicsItem.

    2 items exist now. After doing some resize of these items, use mouse click, inside certain item's region, the mouse click event cannot be received by the QGraphicsItem. Does anyone has an idea about the possiblity of this problem? Thanks in advance.

    PS: i checked the boundingRect of the item, my click-point is inside it.

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QGraphicItem is not recognized

    You can always install eventFilter on qApp object and add qDebug info inside. This way you can track down whats happening to the mouse press events.

  3. #3
    Join Date
    Mar 2011
    Posts
    63
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QGraphicItem is not recognized

    So the items are clickable first and when you do some changes it isn't clickable anymore?

    Well my first thought was that you arent changing the bounding rect when you resize the items and that you lose it somehow. Some code would be nice because could keep on guessing

  4. #4
    Join Date
    Jul 2008
    Location
    Munich
    Posts
    73
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QGraphicItem is not recognized

    Quote Originally Posted by stampede View Post
    You can always install eventFilter on qApp object and add qDebug info inside. This way you can track down whats happening to the mouse press events.
    Thanks for your suggestion. Now I am trying this way.

Similar Threads

  1. Refresh + QGraphicItem + drawText
    By NoRulez in forum Qt Programming
    Replies: 4
    Last Post: 18th August 2009, 08:55
  2. QGraphicScene and different topmost QGraphicItem
    By Xaar in forum Qt Programming
    Replies: 3
    Last Post: 5th December 2007, 17:58
  3. identify QGraphicItem
    By avis_phoenix in forum Qt Programming
    Replies: 5
    Last Post: 24th September 2007, 07:16
  4. Location of QGraphicItem!!
    By rachana in forum Qt Programming
    Replies: 2
    Last Post: 2nd February 2007, 22:20
  5. need help with QGraphicItem
    By rachana in forum Qt Programming
    Replies: 13
    Last Post: 30th January 2007, 07:27

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.