Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Border arround text
Forum Updated to NodeBB v4.3 + New Features

Border arround text

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 4.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dvillalobos
    wrote on last edited by
    #1

    Hi all,

    How can I draw a border arround text, like Qt Creator does for highlighting matches in search?

    Regards

    David

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

      [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.

      http://anavi.org/

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dvillalobos
        wrote on last edited by
        #3

        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.

        Regards

        David

        1 Reply Last reply
        0
        • L Offline
          L Offline
          leon.anavi
          wrote on last edited by
          #4

          [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.

          http://anavi.org/

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            you can use the same technique as in the last posts mentioned:

            "Highlight search text":https://qt-project.org/forums/viewthread/19004/

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dvillalobos
              wrote on last edited by
              #6

              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.

              Regards

              David

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved