I can't get monito's depth?

  • i have two monitos,i want to get two monitos' depth, so i write this:
    @QDesktopWidget* desktopWidget = QApplication::desktop();
    int nMonitorCount = desktopWidget->screenCount();
    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?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.