PDA

View Full Version : how to disable double click event on qmainwindow titlebar?



banlinhtienphong
26th March 2011, 02:48
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?

BalaQT
28th March 2011, 10:23
Hi, just use the windowflags,

setWindowFlags(Qt::WindowMinimizeButtonHint);
setWindowState(Qt::WindowMaximized);
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