Do not let QDialog minimize on secondary screen
Hi,
I have an application that is shown on the main screen and it also have a widget that is showed on a secondary screen calling "showFullScreen".
The problem is that when the user minimizes the mainWindow, the widget on the second screen is also minimized and I want to avoid that.
I want this widget to be shown all the time like a top window.
I have tryied "setWindowFlags(Qt::WindowStaysOnTopHint)" but it does not show the widget.
I also have tryied to catch the hide event of the widget and accept it, but it is still minimized.
Any idea?
Thanks,
Re: Do not let QDialog minimize on secondary screen
Hi,
Finally I found a solution:
Make the widget(or dialog in my case) to do not have a parent
Then the problem was that when I close the main window, the application does't close and this is because there is still a window to close("quitOnLastWindowClosed").
To solve this second problem you have to redefine the "closeEvent" on the mainWindow and close the widget(or dialog) there.
I hope it helps other people with same problem.