How to set background color for line (not text) in QTextEditor.

Example, every line start with text "DEPRECATED" will set background color red.

use QTextCharFormat only fill background for text