Qt OS X hiding MainWindow freezes GUI - c++

I've found that when pressing CMD+H on my Mac and then tabbing back into the application my GUI is frozen until i minimize and maximize the window.
Any ideas what could be causing this?
I've tried:
Removing QTimer
Removing eventFilter
I'm out of ideas on what to try here.
Edit
I tried to create a new simply application that just contained a form and a text input. I deployed it using macdeployqt and I get the exact same behavior. The GUI freezes after a hit CMD+H.

Related

How to make Qt MainWindow always on top AND above start menu in Windows 11

I'm trying to make a widget tool that stays above EVERYTHING.
Following the other stackoverflow post, I set the flag
setWindowFlags(Qt::WindowStaysOnTopHint);
and use a timer to constantly raise the window.
Now it can stay above all normal windows and other always-on-top windows. But it will still get blocked if the Start menu is open.

QDialog or QMessageBox show Qt::BusyCursor when added to existing application

I am new to qt and I have an issue I cannot understand.
I have created my own QDialog and now I want to add it to an existing application.
In QT creator, everything works fine but when I add either my custom dialogue or even a
message box to the existing code, something odd happens.
The dialogue works just fine but when I hover over the main area of the dialogue
the icon changes to a Qt::BusyCursor the busy wait icon.
At first I assumed this must be a threading issue but then isn't .exec() suppose to block?
Also when I hover over the title bar or the message box / dialogue, it seems fine i.e it shows a Qt::ArrowCursor, in both cases the dialogue functionally works fine also.
I have tried to set the .setCursor() on both and it did not work still a busy icon.
can anyone give me some hints as to what I might look at to investigate this more.
Thanks a lot!!!
I can suggest you to use
QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
and reset it with
QApplication::restoreOverrideCursor();.

Making a lauched QT applicatioin get Focus in windows

Currently whenever my application starts it does not appear in the foreground. It appears on the taskbar but it does not get focus. I tried doing the following
application.setActiveWindow(&w);//w if my form widget
but this just makes it blink. Any suggestion on how I could set the focus to my application.

Qt 5.1 - QMessageBox Bug? Program Exits(0) if QMessageBox is called while QDialog is hidden

I seem to have discovered an annoying issue with Qt 5.1.
Let's say for example you have a system tray icon (QSystemTrayIcon) and you hide your form (QDialog), so:
this->hide();
Then, while the form is hidden, your app displays a message box:
QMessageBox::information(0, "Test", "Test");
Once the user hits Ok to close the dialog, the program exits with exit code 0. So, it doesn't crash, but it politely exits.
The only work around that I know off is to use the WIN32 API on Windows and the MessageBox function. This is not what I want to do.
Is this a bug?
By default, a Qt application closes when the last window is closed (in your case, when you close the QMessageBox).
You can add this code to keep your application running:
qApp()->setQuitOnLastWindowClosed(false);

Popup windows are behind window but it is rendered front?

I am updating the webkit embeded to my program however I come across a new problem about popup windows (MessageBox or File/Folder chooser dialogs).
For instance, if I invoke a javascript alert() clicking on a link, the MessageBox is rendered in front of the webkit window and looks like it is clickable, however when it is clicked the webkit window gain the focus and the MessageBox goes back of the webkit window. After that everything works as usual.
This problem does not happens if I invoke the alert() with keyboard.
So given the clues, what could be the solution, any tips ?
OS: Win7
In win/webview.cpp WM_CANCELMODE message invokes a function. Comment out, problem is solved.