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. Code condensed in editor
QtWS25 Last Chance

Code condensed in editor

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 1.1k Views
  • 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.
  • B Offline
    B Offline
    BSch13
    wrote on last edited by
    #1

    I'm working in Qt editor 4.2.1 on a mac and have inadvertently done something to condense several lines of code into a small rectangular box displaying an ellipsis. The same blunder also simultaneously condensed additional distal lines of code into a rectangle box displaying an ellipsis and a curly right bracket ( ...} ) When I hover the mouse cursor over either rectangle(s), I can see the code, but not interact with it. After spending quite a bit of time searching for what might have happened, my best guess is that I may have somehow "folded" a block, but I am not sure. The documentation page on this (http://doc.qt.io/qtcreator/creator-highlighting.html) suggests that I display some folding markers by going to tools > options > text editor > behavior > display folding markers, however under my tools menu, there is no "options" option. So I'm a bit stuck, and of course, I may be on the wrong remedy trail altogether. I would be most grateful to learn how to fix this and also to know, if possible, how I fell into this problem in the first place so that I may avoid it in the future. Also, is there some setting, perhaps in the preferences, that I might configure to have my tools options available? Many thanks in advance.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi! Do you mean "condensed" like this?

      If yes, you can do a left-mouse-click on that rectangle with the braces and the three dots or you can click on the small arrow-head (right next to the "18" in the pic). Also see Tools > Options > Environment > Keyboard, and search for "fold" and "unfold" to find out what the corresponding keyboard shortcuts are set to.

      1 Reply Last reply
      2
      • E Offline
        E Offline
        Eeli K
        wrote on last edited by
        #3

        Here on Linux I have menu item Edit -> Advanced -> Fold/Unfold/Toggle fold all. Clicking that small triangle/arrowhead on the left side of the text is a standard feature of many code editors AFAIK.

        1 Reply Last reply
        2
        • B Offline
          B Offline
          BSch13
          wrote on last edited by
          #4

          First of all, I have to give this forum an A+ on responsiveness. Both of my cries for help have evoked immediate assistance, so thank you all once more. I did manage to wriggle out of my bind by closing the project and re-opening, however I'm still a bit perplexed as to what it was that I encountered? Am I correct that this is means of hiding sections of code so as to make the remainder more readable? If so, I can see the benefit of that. Still I have no idea what it was that triggered the situation. Wieland, yes!, that rectangular box is what I was dealing with, although with just the ellipsis and not the curly brackets (except in the second case). I did not have the triangle to the left though, and there was no "Options" present under the Tools menu, which is certainly odd. A left mouse click on the rectangle itself produced no response, and a right mouse click produced a pop-up menu, however there were no choices on that menu that appeared relevant to the situation. Eeli K, thank you! I did find that sequence of choices on my menu and I will apply them to become familiar. Just out of curiosity, on your Linux version, do have an "options" under the tools menu.? Perhaps that condition is unique to the mac software. In any event, it does appear to be a deviation from the documentation.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            On macOS it's under Preferences in the Qt Creator menu.

            You have likely used the shortcut for folding accidentally.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            B 1 Reply Last reply
            1
            • SGaistS SGaist

              Hi,

              On macOS it's under Preferences in the Qt Creator menu.

              You have likely used the shortcut for folding accidentally.

              B Offline
              B Offline
              BSch13
              wrote on last edited by
              #6

              @SGaist Thanks! That about settles it then! Closing this out.

              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