Results 1 to 4 of 4

Thread: Having a lot of child widgets, what can be best, filterevent or place 'detectors'

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Having a lot of child widgets, what can be best, filterevent or place 'detectors'

    I have a container widget where I place some children w.. My container has not empty borders (the children w. are placed from 0,0 to width, height, that is to say, can occupy the whole parent space).
    I'like to control when the mouse is on the 4 borders of the parent widget.
    What can be best, place 4 transparent frames or install a filter event for all the child widgets ?
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Having a lot of child widgets, what can be best, filterevent or place 'detectors'

    Just write appropriate event handlers. If that's not enough then install event filters.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    tonnot (5th August 2011)

  4. #3
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Having a lot of child widgets, what can be best, filterevent or place 'detectors'

    A last question, Is not possible to send mouse events automatically to the widgets placed behind the front widget ?
    Something to 'sendtoback' or 'send to children of'. ?
    Thanks.

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Having a lot of child widgets, what can be best, filterevent or place 'detectors'

    Quote Originally Posted by tonnot View Post
    Something to 'sendtoback' or 'send to children of'. ?
    I think you should reconsider what is a child of what.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QGridLayout place new widgets at top
    By rouge in forum Newbie
    Replies: 7
    Last Post: 6th October 2011, 08:06
  2. Child widgets
    By poporacer in forum Newbie
    Replies: 6
    Last Post: 12th August 2010, 03:04
  3. Replies: 5
    Last Post: 18th April 2010, 23:31
  4. How correct to place widgets in QMdiSubWindow
    By sawerset in forum Qt Programming
    Replies: 0
    Last Post: 15th April 2009, 23:49
  5. How to get the child widgets from a Widget?
    By prykHetQuo in forum Qt Programming
    Replies: 2
    Last Post: 29th January 2009, 13:26

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.