Results 1 to 1 of 1

Thread: ItemIsSelectable & mouseReleaseEvent

  1. #1
    Join Date
    Dec 2009
    Posts
    50
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default ItemIsSelectable & mouseReleaseEvent

    Hi All

    Originally my item is not selectable. And I can get

    void MyItem::mouseReleaseEvent( QGraphicsSceneMouseEvent * event )


    But after I set

    item->setFlag(QGraphicsItem::ItemIsSelectable, true);

    followed by

    item->setFlag(QGraphicsItem::ItemIsSelectable, false);


    I can not get mouseReleaseEvent any more.


    Any ideas?

    UPD. QT ver 4.7

    UPD: problem is solved: in mousePressEvent event->accept(); was missing
    Last edited by medved6; 26th October 2010 at 02:05.

Similar Threads

  1. Issue while overloading mouseReleaseEvent
    By Thierry in forum Qt Programming
    Replies: 7
    Last Post: 16th February 2010, 16:26
  2. mousePressEvent & mouseReleaseEvent question
    By MarkoSan in forum Qt Programming
    Replies: 13
    Last Post: 9th December 2009, 07:55
  3. Widget that receives the mouseReleaseEvent
    By qtUser500 in forum Newbie
    Replies: 10
    Last Post: 16th July 2009, 15:33
  4. Strange mouseReleaseEvent behaviour.
    By ricardo in forum Newbie
    Replies: 11
    Last Post: 5th May 2009, 23:35
  5. Qt::ItemIsSelectable in a model/view structure
    By schall_l in forum Qt Programming
    Replies: 5
    Last Post: 12th February 2008, 11:42

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.