Window
-
You don't need to do anything. The application will be resized whenever the window size is changed.
-
[quote author="mikealfa" date="1330517063"]but what i am saying is i want my window without the title bar.....as in what happens when we double click in the vlc media player[/quote]
You can re implement the @mouseDoubleclickevent()@ and their you can call @showmaximized()@
function. -
Is think there is no platform-independent way of receiving system menu events, so you will have to reimplement the change event and modify the window state accordingly.
@
void MainWindow::changeEvent(QEvent *event)
{
if(event->type() == QEvent::WindowStateChange)
{
if(windowState() & Qt::WindowMaximized)
{
showFullscreen();
}
}QMainWindow::changeEvent(event);
}
@
Brain to terminal. Not tested. Exemplary.Two additions:
- you are tinkering with default behaviour here; the user usually does not expect that a window goes into fullscreen when the maximize button is clicked
- a fullscreen window has no system menu; you will have to provide other means to return from fullscreen, otherwise you are trapped in it