Results 1 to 3 of 3

Thread: QDockWidget: disable double click on title bar

  1. #1
    Join Date
    Oct 2008
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default QDockWidget: disable double click on title bar

    Howdy,

    I have some QDockWidget's and I want to disable the double click on the title bar. At the moment, I'm porting a windows MFC app to Qt, and it's not using a QMainWindow yet, so double clicking on the titlebar hides the window, rather than docking/undocking it.

    Is there an easy way to do this, or should I just not use QDockWidget until I have a QMainWindow?

    Many thanks!

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QDockWidget: disable double click on title bar

    You can temporarily filter out the mouse double click event with an event filter.
    J-P Nurmi

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

    ElectroQt (9th October 2008)

  4. #3
    Join Date
    Oct 2008
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QDockWidget: disable double click on title bar

    Thanks for the quick response, that worked a treat - once I realised that the correct event type was QEvent::NonClientAreaMouseButtonDblClick

Similar Threads

  1. Double Click Capturing
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 8th January 2011, 14:12
  2. Double click resize window disable
    By MarkoSan in forum Qt Programming
    Replies: 3
    Last Post: 13th May 2008, 11:35
  3. Replies: 1
    Last Post: 9th February 2007, 09:41
  4. QGraphicsScene Click / Double Click
    By philentropist in forum Qt Programming
    Replies: 1
    Last Post: 9th February 2007, 04:32

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.