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

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -