Results 1 to 3 of 3

Thread: Find what event is triggered on an action

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2015
    Location
    Ontario, Canada
    Posts
    28
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Find what event is triggered on an action

    I've made a class (inherited QMainWindow - I'll call it MyMainWindow here) where I've reimplemented the dropEvent and the mousePressEvents in order to let me re-parent QDockWidgets by dragging and dropping them between different instances of MyMainWindow. It currently re-parents them fine, except after re-parenting them it doesn't go straight to letting the user choose where to dock the re-parented QDockWidget on the MyMainWindow like I was hoping it would.

    I found however that it will do this after I move my mouse over the top left corner of the MyMainWindow object's dock. I wanted to know if there was a way that I could capture what events are occurring so when I mouseover the top left of the widget I could find what signal it was and manually trigger it at the end of my dropEvent.

    Alternatively if there was a way to manually call the function that lets a user move where a QDockWidget is docked that would also work.

    Thanks

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

    Default Re: Find what event is triggered on an action

    You can see all events going to an object by installing an event filter on that opject.
    You can see all events by installing an event filter on the application object.

    It might also be useful, maybe even more than tracking events, to look at the code of QMainWindow.

    Cheers,
    _

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

    TEAmerc (1st October 2015)

Similar Threads

  1. Replies: 2
    Last Post: 30th January 2013, 05:02
  2. action triggered no emit
    By waiter in forum Newbie
    Replies: 3
    Last Post: 27th September 2012, 23:26
  3. find out which shortcut triggered action
    By qt_gotcha in forum Newbie
    Replies: 3
    Last Post: 23rd August 2010, 20:27
  4. Replies: 1
    Last Post: 12th June 2010, 09:17
  5. Capture the triggered event of MacWindowToolBarButtonHint
    By alexandersv in forum Qt Programming
    Replies: 0
    Last Post: 11th October 2009, 17:05

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.