How to remove the edge of a Pyqt5 window on Raspberry Pi?

Asked

Viewed 347 times

1

I’m developing an application that will run on a Raspberry Pi interfaced in Pyqt5. This application will occupy the entire screen, making it impossible for the user to click outside the application. As the monitor will always be the same, I set a default resolution for the screens, and are displayed already at the 0x0 position of the monitor. In my Windows the application worked correctly, already in the Raspberry Pi the command

self.dialog.setWindowFlag(QtCore.Qt.FramelessWindowHint)

does not work. When I leave this line in the script the window does not open.

  • How can I leave my application without this edge?

One of the ways is to display the screen using the command

self.window.showFullScreen()

but in case it would be

self.dialog.showFullScreen()

But the question remains, now in the case of the application that is not fullscreen, and that the person wants to implement the menu bar itself.

1 answer

0

I did the tests here on a Raspberry Pi and it worked by passing the following parameters:

self.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint | QtCore.Qt.WindowCloseButtonHint)

Remembering that the command becomes . setWindowFlags instead of . setWindowsFlag (since they are more than one)

Thus eliminating any edge.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.