I had no idea that there was such a strange bug in Ubuntu. WindowType_Mask: A mask for extracting the window type part of the #tWindowFlags(Qt.WindowCloseButtonHint | Qt.WindowType_Mask)ītw, the reason is that you use the Qt.WindowType_Mask flag. I don't know why you are using tWindowFlags in goFullscreen() function. Note: even terminating the process using ctrl+c or closing command prompt doesn't work, only task manager does. tWindowFlags(Qt.WindowCloseButtonHint | Qt.WindowType_Mask) Self.shortcut_close_window = QShortcut(QKeySequence('F11'), self) # to take up all the space in the window by default.
# The `Qt` namespace has a lot of attributes to customise Super(MainWindow, self)._init_(*args, **kwargs) # Subclass QMainWindow to customise your application's main window How can I stop the application from running in the background when I enter fullscreen mode?įrom PyQt5.QtWidgets import QApplication, QLabel, QMainWindow, QShortcut When I checked task manager, the python process was under the background processes category. It only showed the other windows that I had open. It also didn't appear in the alt+tab windows. When I made a window go into fullscreen mode, the application icon was hidden from the taskbar (after doing alt-tab).