qt获取屏幕分辨率
1 2 3 4
| QRect mRect; mRect = QGuiApplication::primaryScreen()->geometry(); qDebug()<<"width:"<<mRect.width()<<" height:"<<mRect.height();
|
.获取多个显示器屏幕大小
1 2 3 4 5 6 7 8 9 10 11
| QList<QScreen *> list_screen = QGuiApplication::screens();
for (int i = 0; i < list_screen.size(); i++) { QRect rect = list_screen.at(i)->geometry(); int desktop_width = rect.width(); int desktop_height = rect.height(); qDebug() << desktop_width <<desktop_height; }
|
error:
libQt5WebEngineCore.so: .dynsym local symbol at index 3
解决:sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld