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. How to disable auto search highlighting in Qt Creator?
Forum Updated to NodeBB v4.3 + New Features

How to disable auto search highlighting in Qt Creator?

Scheduled Pinned Locked Moved General and Desktop
21 Posts 9 Posters 9.5k Views 2 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.
  • V Offline
    V Offline
    vincegata
    wrote on last edited by
    #1

    Hello,

    I am using C++ with Qt Creator. When I click on a word in the code it highlights all other occurrences of this word.

    How do I disable this behavior? I did search all of the Text Editor Options.

    THX!

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      I do not think that there is a configuration option for this. I really like this feature as it allows you to easily spot typos in variable names etc.

      I especially like the renaming feature that is coupled to it. Try pressing Ctrl-Shift-R and edit the name then hit enter - all occurrences will be renamed at once.

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        Actually it does not highlight the word but all occurances of a variable. There should not be any highlights outside of the scope you are currently in (even if the current variable is shadowing another variable of the same name).

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vincegata
          wrote on last edited by
          #4

          That's correct.

          How can I disable that?

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on last edited by
            #5

            I am not aware of any option to turn this off.

            You can most likely adjust the color to be less obvious though, but that will of course not stop the look ups themselves from happening.

            1 Reply Last reply
            0
            • V Offline
              V Offline
              vincegata
              wrote on last edited by
              #6

              What is the setting to adjust the color so I could just hide it?

              I tried few, such as Occurrences but could not find it.

              Thanks!

              1 Reply Last reply
              0
              • C Offline
                C Offline
                carabasen
                wrote on last edited by
                #7

                Any changes since then? It's really annoying feature.

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  fluca1978
                  wrote on last edited by
                  #8

                  [quote author="vincegata" date="1308662180"]
                  I tried few, such as Occurrences but could not find it.

                  [/quote]

                  Occurrences is working for me: if I change the color scheme of occurrences I can see that each variable I place the mouse onto is painted in such way.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    andre
                    wrote on last edited by
                    #9

                    Not that I am aware of, and I disagree: I think it is a great feature.

                    1 Reply Last reply
                    0
                    • F Offline
                      F Offline
                      fluca1978
                      wrote on last edited by
                      #10

                      [quote author="Andre" date="1322570788"]I think it is a great feature. [/quote]

                      So do I. If an highlight is not what you need or what you are searching for than e plain old editor could be your friend.

                      1 Reply Last reply
                      0
                      • I Offline
                        I Offline
                        itech
                        wrote on last edited by
                        #11

                        [quote author="Andre" date="1322570788"]Not that I am aware of, and I disagree: I think it is a great feature. [/quote]

                        Well I agree that it is NOT. It's very annoying. QT Creator is a great IDE and ability to disable these all "blink-blank" spangles could make it even greater.

                        1 Reply Last reply
                        0
                        • F Offline
                          F Offline
                          fluca1978
                          wrote on last edited by
                          #12

                          One reason why this is useful is that it allows you to see if all the highlighted words are what you mean they are. Suppose you write a variable named "myString" and on another line you have "mystring", having a glance to the fact that the two are not enlighten the same is an hint that there is a possible problem. Even better is the behavior of KDevelop, that assigns to each variable a different color to help preventing misspelled errors.

                          1 Reply Last reply
                          0
                          • I Offline
                            I Offline
                            itech
                            wrote on last edited by
                            #13

                            I am not discussing if it is usefull or if it is not. I am discussing why i can't turn it off. I know what I am writing in code and what I am reading from it. I can't remember such a case where I had a problem with mispelled variables (If I ever had one - compiler quickly solves the problem). Such a highlights maybe usefull for 5 year old kid when he is not sure what he is writing and what he is reading, but for expierenced programmer like me these all "blink-blank's" only disturbs and nothing more. I tried to turn it off through syntax highlight - no success, so I am asking maybe i could turn it off somewhere in configuration files. That's all.

                            1 Reply Last reply
                            0
                            • F Offline
                              F Offline
                              fluca1978
                              wrote on last edited by
                              #14

                              [quote author="itech" date="1349419560"]Such a highlights maybe usefull for 5 year old kid when he is not sure what he is writing and what he is reading, but for expierenced programmer like me these all "blink-blank's" only disturbs and nothing more.[/quote]

                              Well, let's say that QtCreator does that because QtCreator's developers, that I guess are talented and experienced, thought it was an useful feature. Having said that, if you are a so experienced developer, you will surely be able to use another IDE, like Eclipse or even a real editor, like Vi or Gnu Emacs.
                              Moreover, while it is true that the compiler can catch (and surely has to) syntax errors, the trip to the compiler could be time expensive in the case of large projects, and this is why I strongly believe that any editor/IDE that can help you before you have to pass the toolchain is a good added value.

                              1 Reply Last reply
                              0
                              • I Offline
                                I Offline
                                itech
                                wrote on last edited by
                                #15

                                [quote author="fluca1978" date="1349420294"]Having said that, if you are a so experienced developer, you will surely be able to use another IDE, like Eclipse or even a real editor, like Vi or Gnu Emacs.[/quote]

                                Surely I am using several of these when there is need and I am repeating once more that I am not asking about other IDE suggestions nor is this feature usefull or not, I am asking maybe someone know how to turn it off. If you know the answer you may say that you I can do it here or here, or I can't. That's all.

                                1 Reply Last reply
                                0
                                • F Offline
                                  F Offline
                                  fluca1978
                                  wrote on last edited by
                                  #16

                                  Go to the editing options, select the occurences line and change the background color to something very close to white (or you background text color), but not fully white. You will dim the effect. I don't believe you can remove this behavior.

                                  1 Reply Last reply
                                  0
                                  • I Offline
                                    I Offline
                                    itech
                                    wrote on last edited by
                                    #17

                                    Already tried this with no success.

                                    1 Reply Last reply
                                    0
                                    • F Offline
                                      F Offline
                                      fluca1978
                                      wrote on last edited by
                                      #18

                                      I did on my Qt Creator 2.5 on Linux and it worked fine, and now I don't have the light around words, or better there is still an almost invisible frame around words that I cannot see until I get close to the monitor.

                                      1 Reply Last reply
                                      0
                                      • I Offline
                                        I Offline
                                        itech
                                        wrote on last edited by
                                        #19

                                        I have Qt Creator 2.41/Linux. Maybe that's the reason I could not see any changes. I'll check it out. Thanks!

                                        1 Reply Last reply
                                        0
                                        • D Offline
                                          D Offline
                                          DBillen
                                          wrote on last edited by
                                          #20

                                          I see this is old but found it searching for a solution to the same problem. Here's what I just discovered: Apparently the code does something clever if it thinks you haven't set the color - not only if you've set to default but also if the colors match. So you have to set the colors almost, but not exactly, like the default colors. This will make it so faint that it's much less irritating.

                                          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