參考:https://blog.csdn.net/xuebin5260/article/details/50483179
https://blog.csdn.net/u013541325/article/details/106966650?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_baidulandingword-0&spm=1001.2101.3001.4242
//獲取可用桌面大小
? ? QRect deskRect = QApplication::desktop()->availableGeometry();
? ? int w = deskRect.width();
? ? int h =deskRect.height();
? //獲取主屏幕分辨率
? QRect screenRect = QApplication::desktop()->screenGeometry();
? //獲取屏幕數(shù)量
? int nScreenCount = QApplication::desktop()->screenCount();
? ? int width = this->width();//獲取窗口寬度
? ? int height = this->height();
? ? int test = 10;