qt - QGuiApplication::primaryScreen() with multiple screens on mac -
this question has answer here:
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
Post a Comment