if ( windowState() == Qt::WindowFullScreen) cout<<"FullScreen";
setWindowState(Qt::WindowFullScreen);
if (isMaximized()) cout<<"WindowMaximized";
if ( windowState() & Qt::WindowMaximized) cout<<"WindowMaximized";
setWindowState(windowState() ^ Qt::WindowFullScreen);