本文整理汇总了Python中PyQt5.QtCore.Qt.AA_UseHighDpiPixmaps方法的典型用法代码示例。如果您正苦于以下问题:Python Qt.AA_UseHighDpiPixmaps方法的具体用法?Python Qt.AA_UseHighDpiPixmaps怎么用?Python Qt.AA_UseHighDpiPixmaps使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtCore.Qt
的用法示例。
在下文中一共展示了Qt.AA_UseHighDpiPixmaps方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AA_UseHighDpiPixmaps [as 别名]
def __init__(self, args):
"""Constructor.
Args:
Argument namespace from argparse.
"""
self._last_focus_object = None
qt_args = configinit.qt_args(args)
log.init.debug("Commandline args: {}".format(sys.argv[1:]))
log.init.debug("Parsed: {}".format(args))
log.init.debug("Qt arguments: {}".format(qt_args[1:]))
super().__init__(qt_args)
objects.args = args
log.init.debug("Initializing application...")
self.launch_time = datetime.datetime.now()
self.focusObjectChanged.connect( # type: ignore[attr-defined]
self.on_focus_object_changed)
self.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
示例2: handle_high_resolution_display
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import AA_UseHighDpiPixmaps [as 别名]
def handle_high_resolution_display():
if hasattr(Qt, 'AA_EnableHighDpiScaling'):
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
if hasattr(Qt, 'AA_UseHighDpiPixmaps'):
QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True)