For example:
self.content_text = QtWidgets.QTextEdit(self.tab_2)
self.content_text.setTextColor( ? )
The params are:
(self, Union, QColor=None, Qt_GlobalColor=None, QGradient=None)
What is Union
? Which value should I type in?
For example:
self.content_text = QtWidgets.QTextEdit(self.tab_2)
self.content_text.setTextColor( ? )
The params are:
(self, Union, QColor=None, Qt_GlobalColor=None, QGradient=None)
What is Union
? Which value should I type in?
Method setTextColor has following prototype (from QTextEdit.py):
Union here is typing.Union, that used for type hints. Union[QColor, Qt.GlobalColor, QGradient] means "parameter with type QColor or Qt.GlobalColor or QGradient". For some reason it appears in params list too while docstring
setTextColor(self, Union[QColor, Qt.GlobalColor, QGradient])
is correct. In your program use this method like