PyQt(Python+Qt)学习随笔:desktop的宽带、高度widthMM、heightMM

通过desktop获取桌面的高度和宽度,代码如下:

desktop = app.desktop()
srceenSize = desktop.width(),desktop.height()
srceenSizeMM = desktop.widthMM(),desktop.heightMM()

其中srceenSize 返回的值是以像素为单位的宽度和高度,而srceenSizeMM是以毫米为单位的宽度和高度。


博客地址:https://blog.csdn.net/LaoYuanPython

老猿Python博客文章目录:https://blog.csdn.net/LaoYuanPython/article/details/98245036

原文地址:https://www.cnblogs.com/LaoYuanPython/p/11931615.html