There is a code snippet:
from PyQt5.Qt import * class Example(QWidget): def __init__(self): super(Example, self).__init__() self.initUi() def initUi(self): self.setStyleSheet('background : #7c7c7c') self.mainLayout = QVBoxLayout() self.b = QPushButton('Text') self.b.setStyleSheet('background : #000221; color: #ececec') self.b.setToolTip('Tooltip') self.mainLayout.addWidget(self.b) self.setLayout(self.mainLayout) app = QApplication([]) e = Example() e.show() app.exec() However, it does not work as I would like:
How to change the text color of the tooltip or its background?

