Results 1 to 3 of 3

Thread: Get hover Enablae in parent and get click event in child item

  1. #1
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Thanks
    75
    Thanked 24 Times in 21 Posts
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Get hover Enablae in parent and get click event in child item

    hi.
    I have a child and a parent item and i want to get hover event in parent and click events in child item. How can i do that?

    Details:
    For example i have a parentRect and childRect. I want to when pointer is inside the parentRect its scale grows and when user click inside childRect let childRect's opacity changes.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Get hover Enablae in parent and get click event in child item

    The objects you are talking about - instances of what classes are they?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Nov 2010
    Posts
    82
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Get hover Enablae in parent and get click event in child item

    look at this:
    http://qt-project.org/wiki/Drag_and_...hin_a_GridView

    the parent mange everything using childAt()

Similar Threads

  1. Replies: 3
    Last Post: 25th May 2011, 17:03
  2. QT Model View - parent Item different from child
    By mromanuk in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2011, 18:21
  3. QGrsphicsItem click and hover events
    By liqxpil in forum Newbie
    Replies: 3
    Last Post: 21st October 2010, 10:51
  4. Replies: 7
    Last Post: 14th January 2010, 08:47
  5. Replies: 2
    Last Post: 4th August 2008, 07:44

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.