Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

i can't get monito's depth?

$
0
0
i have two monitos,i want to get two monitos’ depth, so i write this: QDesktopWidget* desktopWidget = QApplication::desktop();     int nMonitorCount = desktopWidget->screenCount();     qDebug()<<"nMonitorCount"<<nMonitorCount;     for( int i=0; i< nMonitorCount; i++ )     {         QRect screenRect = desktopWidget->screenGeometry(i);         QPixmap pix = desktopWidget->grab(screenRect);         int depth = pix.toImage().depth();         qDebug()<<"depth = "<<depth;     } but i get only my primaryScreen’s depth,so who can help me to get two monitos’ depth?

Viewing all articles
Browse latest Browse all 13965