pyqt5 window flags

PyQt5 can be used to create graphical interfaces with Python.

A PyQt window can be configured using window flags.
After ‘configuration’, it will create another type of window.

Related course:

Window flags?
Some windows don’t have a close window, others don’t have the title bar and so on. If you use Chrome, you may see a different type of title bar.

You would set a windows flags using this method:

where flags is defined as

PyQt window flags
PyQt has these window flags:

  • Qt.MSWindowsFixedSizeDialogHint
  • Qt.X11BypassWindowManagerHint
  • Qt.FramelessWindowHint
  • Qt.WindowTitleHint
  • Qt.WindowSystemMenuHint
  • Qt.WindowMinimizeButtonHint
  • Qt.WindowMaximizeButtonHint
  • Qt.WindowCloseButtonHint
  • Qt.WindowContextHelpButtonHint
  • Qt.WindowShadeButtonHint
  • Qt.WindowStaysOnTopHint
  • Qt.WindowStaysOnBottomHint
  • Qt.CustomizeWindowHint

These can be applied to windows.
PyQt has not just one, but many types of windows:

  • Qt.Window
  • Qt.Dialog
  • Qt.Sheet
  • Qt.Drawer
  • Qt.Popup
  • Qt.Tool
  • Qt.ToolTip
  • Qt.SplashScreen

Previous Post
Next Post

Leave a Reply