|  | 
 
 
 楼主|
发表于 2024-4-14 17:08:07
|
显示全部楼层 
| 请问这是什么错误?
 Traceback (most recent call last):
 line 640, in retranslateUi
 self.print_with_color1(notice[0], 'red')
 line 135, in print_with_color1
 format1.setForeground(color1)
 TypeError: 'PySide6.QtGui.QTextFormat.setForeground' called with wrong argument types:
 PySide6.QtGui.QTextFormat.setForeground(str)
 Supported signatures:
 PySide6.QtGui.QTextFormat.setForeground(Union[PySide6.QtGui.QBrush, PySide6.QtCore.Qt.BrushStyle, PySide6.QtCore.Qt.GlobalColor, PySide6.QtGui.QColor, PySide6.QtGui.QGradient, PySide6.QtGui.QImage, PySide6.QtGui.QPixmap])
 
 进程已结束,退出代码为 0
 | 
 |