The code below is one possible solution to my question. Print('Execution time: ', end_time-start_time ) Splash.showFullScreen() # Show in splash screen in full screen mode Splash.windowHandle().setScreen(s) # Set splash screen to secondary monitor Splash = QSplashScreen(pixmap) # Set the splash screen to desired image Print('Screen Name: '.format(s.name(), s.size().width(), s.size().height(), s.availableGeometry().width(), s.availableGeometry().height()))Īpp.setOverrideCursor(QCursor(Qt.BlankCursor)) # S = app.screens() # Get the secondary screen For example, the image window in secondary screen shouldn't take focus away from currently active window in the primary screenįrom PyQt5.QtWidgets import QApplication, QLabel, QSplashScreen When displaying or updating images on the secondary screen, there should be no disturbance on the primary screen.Images/videos need to be displayed in fullscreen mode.No cursor/mouse or other applications should appear on the the secondary screen.Secondary screen is the DLP projector, and it should NOT contain any OS related windows/taskbars/etc. How do I handle a situation if I want to display a video instead of an image?įor 3D printing application, the solution needs to meet the following requirement:.In addition, the window of the QLabel becomes active on the main screen and is visible in the Task bar. When using the QLabel method, all I see is a white screen appear, and only the last iteration the image is displayed. When using splash screen method, I see the splash screen appear on the main screen then it moves to the secondary screen. For example, in the code change the total_loops=1 to total_loops=25. If the images are displayed in high frequency (ex: every 1 sec), this code doesn't work well.There is a distinct delay of ~ 0.5-1s from the time white screen appears to when the actual image is displayed. If I use the QLabel approach, I see a white screen appear and then my image gets loaded.Cursor is hidden as expected, however if I accidentally click mouse on secondary screen, the splash screen closes.I am facing the following issues with my code: I found two approaches using PyQt5: 1) using splash screen, and 2) using QLabel. I would like to programmatically control using Python which image is being displayed.īelow code is one possible solution, however I am unsure if its the correct or the most efficient approach. I want to dedicate this secondary monitor (DLP) only to display my desired patterns images (png, bmp, or svg) for the 3D printing process. When I connect a DLP projector to my Windows PC using HDMI, it shows up as a second monitor. I am working on a DLP projection based 3D printing process. I prefer to work in Windows and preferably find a solution using Python. However, this approach requires me to use Linux. How can I use PyQt5/PySide or any other Python library to display a desired image on a secondary monitor in full-screen mode? In the past, I used a framebuffer image viewer ( Fbi and Fbi improved).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |