Window display control in PYQT5

setWindowState(state) #Set window state

Qt.WindowNoState stateless-normal state

Qt.WindowMinimized minimize

Qt. WindowMaximized maximize

self.setWindowState(Qt.WindowMaximized)

Qt.WindowFullScreen full screen

Qt.WindowActive active window

windowState( ) #Return to window status

showFullScreen() Full screen display does not include window frame

showMaximized() Maximized includes window frame

self.showMaximized()

p>

showMinimized() minimized

showNormal() normal

isMinimized() is the minimized window

isMaximized() is the maximized Window

isFullScreen() full screen

close() control close function

showMinimized( )- minimize;
showMaximized()-maximize;
showFullscreen()-The window is displayed in full screen without title bar and border.
showNormal()-Return to the original size of the window.
activateWindow()-Turn the window into the active window. If the window is minimized, it will be restored to the original size of the window.
setwindowState ()-Set the state of the window according to the Flags value. The Flags value can be a combination of the following values, which come from QtCore.Qt.
windowNoState-normal state
windowMinimized-minimized
windowMaximized-maximized
windowFullScreen-full screen display
windowActive-active window
The following functions can be used to obtain the state of the window:
isMinimized ()-if the window is minimized, the return value is True; otherwise, it is False;
isMaximized()-if the window is maximized, the return value is True; otherwise, it is False;
isFullScreen()-if the window Full screen display, the return value is True; otherwise, it is False;
isActiveWindow()-If it is an active window, the return value is True; otherwise, it is False;;
windowstate()-Returns the combined value of the window state.

PyQt5 window size control

Leave a Comment

Your email address will not be published.