MCPcopy
hub / github.com/PyQt5/PyQt / __init__

Method __init__

QFont/AwesomeFont.py:29–49  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27class ScrollArea(QScrollArea):
28
29 def __init__(self):
30 super(ScrollArea, self).__init__()
31 self.setWindowTitle("FontAwesome Fonts")
32 self.window = QWidget(self)
33 self.setWidget(self.window)
34
35 layout = QGridLayout(self.window)
36 fonts = list(FontAwesomes.alls().items()) # 786个 131*6
37 print(fonts)
38
39 for row in range(131):
40 for col in range(6):
41 # print(row, col, row * 6 + col)
42 layout.addWidget(QPushButton(
43 ": ".join(fonts[row * 6 + col]),
44 self.window,
45 minimumHeight=33,
46 font=QFont("FontAwesome", 14)),
47 row, col, 1, 1)
48
49 self.showMaximized()
50
51 def resizeEvent(self, event):
52 super(ScrollArea, self).resizeEvent(event)

Callers

nothing calls this directly

Calls 4

setWidgetMethod · 0.80
allsMethod · 0.80
addWidgetMethod · 0.80
showMaximizedMethod · 0.45

Tested by

no test coverage detected