(self, color, text, parent=None)
| 24 | class ToolTipItem(QWidget): |
| 25 | |
| 26 | def __init__(self, color, text, parent=None): |
| 27 | super(ToolTipItem, self).__init__(parent) |
| 28 | layout = QHBoxLayout(self) |
| 29 | layout.setContentsMargins(0, 0, 0, 0) |
| 30 | clabel = QLabel(self) |
| 31 | clabel.setMinimumSize(12, 12) |
| 32 | clabel.setMaximumSize(12, 12) |
| 33 | clabel.setStyleSheet("border-radius:6px;background: %s" % color) |
| 34 | layout.addWidget(clabel) |
| 35 | layout.addWidget(QLabel(text, self)) |
| 36 | |
| 37 | |
| 38 | class ToolTipWidget(QWidget): |