这个问题问得很没水平,
查一下Qt Reference就知道了.
void QWidget::setWindowState ( Qt::WindowStates windowState )
Sets the window state to windowState. The window state is a OR'ed combination of Qt::WindowState: Qt::WindowMinimized, Qt::WindowMaximized, Qt::WindowFullScreen and Qt::WindowActive.
If the window is not visible (i.e. isVisible() returns false), the window state will take effect when show() is called. For visible windows, the change is immediate. For example, to toggle between full-screen and mormal mode, use the following code:
w->setWindowState(w->windowState() ^ Qt::WindowFullScreen);
In order to restore and activate a minimized window (while preserving its maximized and/or full-screen state), use the following:
w->setWindowState(w->windowState() & ~Qt::WindowMinimized | Qt::WindowActive);
Note: On some window systems Qt::WindowActive is not immediate, and may be ignored in certain cases.
See also Qt::WindowState and windowState().