3

Highlight and Selction

I am using Qt 5.3 and want to highlight and select the text of QTextEdit like Qt Creator. What I get is just simple highlight with blue background and white color. I am able to change the highlight background and text color with stylesheet and QTextCharFormat. But I can not

  1. Make the highlight area's border radius little bit rounded.(Note in the screenshot)
  2. Draw a border to the selection area.(Note in the screenshot)

In other words I want to format the selection and highlight background area.

stackOverflow
  • 179
  • 1
  • 2
  • 18
  • 1
    about question 1 and 2 i think you must paint the highlighter manuali with QPainter .this topic is your answer about text back color .--https://stackoverflow.com/questions/14310154/how-do-i-set-a-background-color-for-the-width-of-text-not-the-width-of-the-enti – SajadBlog Jan 27 '21 at 13:23

0 Answers0