int Index = QApplication::desktop()->screenNumber(this);
//获取当前屏幕的索引
m_parent->setGeometry(QApplication::desktop()->screenGeometry(Index));
//设置app所在位置
m_parent->show();
补充:mac平台还有一些不可以的部分
m_parent->setGeometry(QApplication::desktop()->screenGeometry(Index));
改为
m_parent->setGeometry(QApplication::desktop()->availableGeometry(Index));
qt双屏显示
最新推荐文章于 2023-09-20 15:36:33 发布