Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Enter and leave events in nested widget
Forum Updated to NodeBB v4.3 + New Features

Enter and leave events in nested widget

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rizokuri
    wrote on last edited by
    #1

    Hi,

    I have a widget that contains children widgets, kind of like a container. The children widgets are on top of the parent. I want to be able to catch enter/leave event such that when the mouse enters a child widget, the leave event of the parent is not called (which is the case now). The leave event should only be called once the mouse actually leaves the parent widget "zone".
    Is this possible?

    Thanks

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      Sure it is! There are multiple mouse events to catch that will handle what you described. For every widget (subclassed) overwrite the mouseEvents and do what you need with it.
      For the parent goes the same, implement the mouseEvent and handle the leave focus.

      Greetz, Jeroen

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rizokuri
        wrote on last edited by
        #3

        Thanks for your reply.

        How can I handle the leave focus? The problem is when I hover my mouse from inside the parent widget to one of the child widget, a leave event is triggered for the parent widget... Even though the child widget is inside the parent's boundaries!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved