Border arround text
-
Hi all,
How can I draw a border arround text, like Qt Creator does for highlighting matches in search?
-
[quote author="David Villalobos" date="1343071353"]Hi all,
How can I draw a border arround text, like Qt Creator does for highlighting matches in search?[/quote]
Could you please provide more details about your goal?
I recommend you the "Basic Drawing Example":http://qt-project.org/doc/qt-4.8/painting-basicdrawing.html as a starting point for your research.
-
Hi Leon,
Thanks for your reply. This is what I need: when you search text in Qt Creator, the found text is sorrunded by a frame and the background color turns to yellow, that is the behavoir I need to implement.
-
[quote author="David Villalobos" date="1343077709"]Thanks for your reply. This is what I need: when you search text in Qt Creator, the found text is sorrunded by a frame and the background color turns to yellow, that is the behavoir I need to implement.[/quote]
As I already recommended in your other similar topic you can use style sheet to customize the appearance of the text.
-
you can use the same technique as in the last posts mentioned:
"Highlight search text":https://qt-project.org/forums/viewthread/19004/
-
Hi Gerolf,
Thanks for your replay.
I'm using the technique you mention, the problem is that since the document is already highlighted I must call rehighlight procedure to highlight the rearch result and this technique is very slow in large documents, it will be great to know how the guys in Qt Creator does the trick.