m_pDesktopWidget = QApplication::desktop(); // 屏体数量,包含扩展屏 int screenCount = m_pDesktopWidget->screenCount();