Inside a QApplication, I want to create non resizable QMainwindow. I don't want the widget to be resizable by the built-in Qt way (meaning, I don't want the size grip to show up and let the user resize the Window). Now the problem: When I press in the lower right corner of the new window, my mouse press events don't come in as expected (when the mouse is pressed), but rather, when the mouse is released. This does not happen, when I press anywhere else on the window, i.e. the mouse press event shows when I actually press the mouse. See attached example code.
I am using Qt 5.12.0 and my OS version is 10.14.3. It seems to happen only on Mac OS
Does anybody know what I might be doing wrong? Or maybe there is a workaround?
//Press mouse in the new window in the lower right corner. The press mouse event print will show up on mouse release, not on mouse press. This only happens in the lower right corner.
class MainWindow : public QMainWindow
explicit MainWindow(QWidget *parent = nullptr) :
//this will get rid of the size grip widget showing
void mousePressEvent(QMouseEvent *) override
// When your mouse is in the lower right corner, tthis will print not when you press, but when you RELEASE the mouse
int main(int argc, char *argv)
QApplication a(argc, argv);