I was able to implement the angular brackets as QRegExp("<.*>");.. sorry i incorrectly mentioned about foreground, i have used it as rx.setForeground(QColor("orange"));.... It worked.. Thank You very much...