Results 1 to 4 of 4

Thread: Stacked widget mouse propagation

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Stacked widget mouse propagation

    Hey there,

    I have a custom layout of stacked widgets.
    I have 2 widgets on top of each other inside this.

    Here is the current scenario :

    - The top widget gets a mouse event.
    - The top widget does not accept that event.
    - The event is propagated to the parent.

    Here is what I want :

    - The top widget gets a mouse event.
    - The top widget does not accept that event.
    - The event is propagated to the widget under it and not its parent.

    How can I do that ?

  2. #2
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Stacked widget mouse propagation

    Nobody knows ? I guess I might ask the trolls themselves

  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Stacked widget mouse propagation

    I think your explanation of the widget hierarchy is a bit hard to understand. Are your two widgets part of the stack of widgets, or are they contained within (children of) one of the widgets in the stack?

    A diagram of some sort would help.

    If the two widgets are children of a widget on the stack, and the widget containing them is currently at the top of the stack, I thought normal behavior was that the lowest-level child got the event first, and then it would propagate up the child->parent chain until it bubbled off the top.

    Are you sure these child widgets are enabled? Or that the hierarchy is what you think it is?

    David

  4. The following user says thank you to d_stranz for this useful post:

    bunjee (14th November 2008)

  5. #4
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Stacked widget mouse propagation

    I have several widgets on top of each others in a stackedLayout.

    They are all visible at the same time.

    Those widgets are containing child widgets.

    When the top widget doesn't accept a mouseEvent, it's transfered to its parent and so on.
    I'd like the event to be transfered to its parent's child widgets instead of being transfered directly to their parents.

    I'll try to post a graphical view of what I'm trying to describe later on.

Similar Threads

  1. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  2. pass mouse event information to another widget
    By Rooster in forum Qt Programming
    Replies: 5
    Last Post: 12th July 2008, 04:23
  3. Replies: 4
    Last Post: 3rd March 2008, 22:15
  4. Replies: 4
    Last Post: 4th February 2008, 06:16
  5. Forwarding mouse events to another widget.
    By yogeshm02 in forum Qt Programming
    Replies: 8
    Last Post: 28th February 2006, 13:25

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.