qt - QGuiApplication::primaryScreen() with multiple screens on mac -


i want capture screenshot in qt:

originalpixmap = qpixmap();     qscreen *screen = qguiapplication::primaryscreen();     if (screen) {         originalpixmap = screen->grabwindow(0);     } 

that works fine. when have second monitor connected on mac, though, grabwindow() return 1 image shows both displays. there way capture screens individually?

no, there's no such way. have split pixmap yourself, based on geometry of each screen. see this answer details of determining geometry.


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -