Property to get my QMainWindow out of the full screen mode.
-
Hi ,
I am working on an application and introducing modifications to the user interface.It only worked in "full screen mode" For those of you who use Qt Creator ,Clicking on the Window menu and hitting Full Screen gets you in a view with no title bar and with no minimise/maximize/close buttons ---this is the mode my app works in .I want to revert it to the good old standard ui with title bars ,minimize/maximize/close buttons ,toolbar and status bars.
I have been struggling with flags for hours to no avail.Is there a setting or a flag I can look for in the code that is controlling the full screen behavior I want to get rid of? I would appreciate any pointers.Thanks for your time.
-
You can display a top-level widget using several methods:
- show()
- showMaximized()
- showFullScreen()
Just pick the one that suits you best. You will most likely find your application is using showFullScreen() right now, and it is located somewhere in main() routine.
-
Thanks for the reply sierdzio,
I have hunted for the location where showFullScreen() may be affecting the behaviour of my application and alt the occurrences turned out to be .However I have located an instance of
@
mainwindow->show();
@that kicks off the display mechanism of the application[It is not within main () ,the app heavily uses design patterns and it is in one controller class. .show() and showNormal() calls on that instance of mainwindow still cause the app to run in full screen mode . Only when I call showMaximized() on it ,do I see the title bar but only with the red close button.The minimize/maximize buttons are not there.
This behaviour is caused by a setting somewhere I can't pin point yet.Any pointers would be appreciated. The application uses multi screens if this helps.
Thanks.
-
Try searching your code for setWindowFlags() calls, or maybe your main widget inherits from QDialog.