2019年4月29日星期一

QT High DPI


PyQt5 and high resolution monitors

High DPI Displays

PyQt 5 and 4k screen

from PyQt5 import QtWidgets, QtCore, QtGui

QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)

QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)

没有评论: