code: def set_as_warning(self, color=QColor("orange")):
          
          self.format.setUnderlineStyle(
              QTextCharFormat.WaveUnderline)
          self.format.setUnderlineColor(color)
docs: Highlights text as a syntax warning.
  
          :param color: Underline color
          :type color: QtGui.QColor