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

Method __init__

QGraphicsView/AddQWidget.py:40–49  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

38class ToolTipWidget(QWidget):
39
40 def __init__(self, *args, **kwargs):
41 super(ToolTipWidget, self).__init__(*args, **kwargs)
42 self.setAttribute(Qt.WA_StyledBackground, True)
43 self.setStyleSheet(
44 "ToolTipWidget{background: rgba(50,50,50,70); border: none;};color:white")
45 layout = QVBoxLayout(self)
46 layout.addWidget(QLabel("test", self))
47
48 for color in ("red", "blue", "green", "yellow", "black"):
49 layout.addWidget(ToolTipItem(color, color, self))
50
51
52app = QApplication(sys.argv)

Callers

nothing calls this directly

Calls 3

addWidgetMethod · 0.80
ToolTipItemClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected