Results 1 to 2 of 2

Thread: how to disable double click event on qmainwindow titlebar?

  1. #1
    Join Date
    Nov 2010
    Posts
    31
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default how to disable double click event on qmainwindow titlebar?

    I don't want when double click on title bar of qmainwindow then qmainwindow resize to normal size.I try event filter but no result.I want qmainwindow show in maximum size and minimum size on taskbar,not normal size.Anyone can help me?

  2. #2
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Thumbs up Re: how to disable double click event on qmainwindow titlebar?

    Hi, just use the windowflags,
    Qt Code:
    1. setWindowFlags(Qt::WindowMinimizeButtonHint);
    2. setWindowState(Qt::WindowMaximized);
    To copy to clipboard, switch view to plain text mode 
    put this code in constructor. there is no need for you to disable the double click.
    please refer,
    http://doc.qt.nokia.com/latest/qt.html#WindowType-enum
    hope it helps,
    bala
    Last edited by BalaQT; 28th March 2011 at 11:27.

Similar Threads

  1. can not get mouse double click event for QGraphicsItem
    By learning_qt in forum Qt Programming
    Replies: 2
    Last Post: 14th September 2009, 21:36
  2. QDockWidget: disable double click on title bar
    By ElectroQt in forum Qt Programming
    Replies: 2
    Last Post: 9th October 2008, 23:22
  3. Double click resize window disable
    By MarkoSan in forum Qt Programming
    Replies: 3
    Last Post: 13th May 2008, 12:35
  4. Catch click/unclick event on QMainWindow border
    By thomaspu in forum Qt Programming
    Replies: 1
    Last Post: 21st February 2008, 00:09
  5. Replies: 1
    Last Post: 9th February 2007, 10:41

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.