QGraphicsTextItem имеет метод palette
, который возвращает QPalette
, а QPalette
имеет метод setColor, который принимает роль.
void QPalette::setColor ( ColorRole role, const QColor & color )
The role you want is
QPalette::Text The foreground color used with Base.
This is usually the same as the WindowText, in which case it must provide
good contrast with Window and Base.