we can create a main window with setWindowFlags(Qt::FramelessWindowHint), but it will make my application don't repsone system (window+M ) keys , anybody know how to get window+M keys work again
we can create a main window with setWindowFlags(Qt::FramelessWindowHint), but it will make my application don't repsone system (window+M ) keys , anybody know how to get window+M keys work again
Qt Code:
#include <qt_windows.h> ... ::SendMessage(winId(), WM_SYSCOMMAND, SC_MOVE, 0);To copy to clipboard, switch view to plain text mode
J-P Nurmi
that's not right,
How can I catch the windows+M key pressed event , when I called setWindowFlags(Qt::FramelessWindowHint), OS will not send me that event.
Oh, sorry. I completely misunderstood the question. For some reason I thought "Windows+M" as the window move action in the system menu.
Anyway, Windows won't send you necessary messages if you only have a Qt::FramelessWindowHint window. So how about using QWidget::setMask() instead of Qt::FramelessWindowHint? Something like this:
Qt Code:
{ Q_UNUSED(event); setMask(rect()); }To copy to clipboard, switch view to plain text mode
J-P Nurmi
Yes , I can use setMask() , but another problem is : when I maximise the application, still title bar's height will be left on the top screen, if I using showfullscreen() then updateGeometry() to make application maximum, in this case , system context menu will be not right. I mean restore menu will be disabled.
Bookmarks