Results 1 to 2 of 2

Thread: make item selected exatcly where drawing is present

  1. #1
    Join Date
    Jun 2013
    Location
    Bangalore
    Posts
    27
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    7

    Default make item selected exatcly where drawing is present

    hi, i have an customized QGraphicsItem as in attachment, the item is selectable. due to boundingRect() that item is getting selected when i click on some regions where item is not drawn (ex in between grid on road & cross above to the grid as that region is included in boundingRect) . how can i implement my item to be selected only when i click exactly where the drawing is present (in my case item has to select when i click on grid or cross above to the grid only).
    Attached Images Attached Images
    Last edited by prasad.ece2; 20th February 2014 at 09:43.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: make item selected exatcly where drawing is present

    QGraphicsItem::shape()

    Cheers,
    _

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

    prasad.ece2 (21st February 2014)

Similar Threads

  1. Replies: 0
    Last Post: 11th June 2013, 11:50
  2. Replies: 0
    Last Post: 1st November 2010, 09:22
  3. popupmenu for QTreeWidget's item when a particular item selected.
    By vinod sharma in forum Best Practices in Qt Programming
    Replies: 1
    Last Post: 22nd January 2010, 11:45
  4. Replies: 1
    Last Post: 20th January 2010, 09:38
  5. How to set selected item of a QListWidget?
    By Lawand in forum Qt Programming
    Replies: 9
    Last Post: 5th April 2009, 12:23

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
  •  
Qt is a trademark of The Qt Company.