I'm running a pyqt5 application on an ubuntu and when the app is in full screen mode, I get this behavior of the dock and title bar popping over the application when a dialog box is clicked. When the dialog box is closed, everything goes back to normal. This issue doesn't happen on my intel but happens on ARM64. My system is the Jetson AGX Xavier 32GB. I've posted a sample code below that reproduces the issue.
I saw another post that suggested in setting the window flag Qt.X11BypassWindowManagerHint or Qt.BypassWindowManagerHint, even though it came with some issues but that didn't work either.
Any help would be greatly appriciated.
from PyQt5.QtWidgets import QComboBox, QVBoxLayout, QWidget, QHBoxLayout, QApplication, QFileDialog, QPushButton, QMainWindow
from PyQt5.QtCore import Qt
import sys
import pyautogui
class TestCode(QMainWindow):
def __init__(self):
super(TestCode, self).__init__()
self.OpenDialog = QPushButton()
self.OpenDialog.setText("OPEN D BOX")
self.OpenDialog.clicked.connect(self.openDBox)
self.closeWindow = QPushButton()
self.closeWindow.setText("CLOSE")
self.closeWindow.clicked.connect(self.close)
colors = ["Yellow", "Magenta", "Black", "White",
"Green", "Blue", "Cyan", "Red"]
self.drop_down = QComboBox()
for color in colors:
self.drop_down.addItem(color)
self.buttonLayout = QVBoxLayout()
self.buttonLayout.addWidget(self.OpenDialog)
self.buttonLayout.addWidget(self.drop_down)
self.buttonLayout.addWidget(self.closeWindow)
self.mainWidget = QWidget()
self.mainLayout = QHBoxLayout(self.mainWidget)
self.freeSpace = QWidget()
self.freeSpace.setStyleSheet("background-color: black")
self.mainLayout.setSpacing(10)
self.mainLayout.setContentsMargins(20, 20, 20, 20)
self.mainLayout.addLayout(self.buttonLayout)
self.mainLayout.addWidget(self.freeSpace, 1)
self.setCentralWidget(self.mainWidget)
self.showFullScreen()
# screenWidth, screenHeight = pyautogui.size()
# self.setGeometry(0,0,screenWidth+1, screenHeight)
def openDBox(self):
openImageFile, _ = QFileDialog.getOpenFileName()
if __name__ == '__main__':
app = QApplication(sys.argv)
main_window = TestCode()
# main_window.setWindowFlags(Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint | Qt.BypassWindowManagerHint)
main_window.show()
sys.exit(app.exec_())