MCPcopy Index your code
hub / github.com/PyQt5/PyQt / get_icon

Function get_icon

QMenu/QQMenu.py:64–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63
64def get_icon():
65 # 测试模拟图标
66 pixmap = QPixmap(16, 16)
67 pixmap.fill(Qt.transparent)
68 painter = QPainter()
69 painter.begin(pixmap)
70 painter.setFont(QFont('Webdings', 11))
71 painter.setPen(Qt.GlobalColor(randint(4, 18)))
72 painter.drawText(0, 0, 16, 16, Qt.AlignCenter,
73 choice(string.ascii_letters))
74 painter.end()
75 return QIcon(pixmap)
76
77
78def about_qt():

Callers 1

init_menuMethod · 0.85

Calls 2

randintFunction · 0.85
setPenMethod · 0.80

Tested by

no test coverage detected