Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    QT Creator - Column Edit

    Tools
    5
    7
    13848
    Loading More Posts
    • 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.
    • M
      Moschops last edited by

      Qt Creator 3.2 supports column editing, described as this:

      Column Editing

      To apply a change to several rows in a column simultaneously, press Alt, select the rows, and start typing. The text you type appears simultaneously at the cursor position on all the selected rows.

      http://qt-project.org/doc/qtcreator-3.2/creator-editor-refactoring.html#column-editing

      Doesn't work for me. When they say "press alt" do they mean tap it once, or do they mean press and hold? Which alt do they mean? On my system (as is very, very, very common on popular Linux window managers) left alt is the generic "drag this window" instruction to my window manager, so am I simply out of the game on column editing? When they say "select", do they mean just highlight the rows I want? Do I have to highlight the whole row, or just any part of the row?

      1 Reply Last reply Reply Quote 0
      • A
        andrep last edited by

        Try pressing Alt, and keep pressed, and press left mouse buttoin, and keep both pressed, and drag mouse.

        1 Reply Last reply Reply Quote 0
        • M
          Moschops last edited by

          Worked it out.

          Press and hold left-alt, and shift, and then use the cursor keys to select rows.

          Alternatively, first press and hold left mouse, THEN press and hold left alt, THEN drag the mouse to select rows.

          1 Reply Last reply Reply Quote 0
          • martin_ky
            martin_ky last edited by

            Is there a way to skip lines when doing column selection?

            For example, SublimeText allows to place multiple cursors anywhere in the text using Ctrl+Click. Same principle (Ctrl+Click-and-Drag, Ctrl+DoubleClick) is used to make multiple non-continuous text selections.

            I wish these edit semantics were supported by all code editors.

            1 Reply Last reply Reply Quote 0
            • martin_ky
              martin_ky last edited by

              Is there a way to skip lines when doing column selection?

              For example, SublimeText allows to place multiple cursors anywhere in the text using Ctrl+Click. Same principle (Ctrl+Click-and-Drag, Ctrl+DoubleClick) is used to make multiple non-continuous text selections.

              I wish these edit semantics were supported by all code editors.

              1 Reply Last reply Reply Quote 0
              • K
                kgregory last edited by

                I just switched to a Mac. I love this feature, but I can't figure out how to do it on the Mac. Any advice?

                1 Reply Last reply Reply Quote 0
                • M
                  mstahl last edited by mstahl

                  Sorry for resurrecting an old thread.
                  I had exactly the same problem as @kgregory and managed to get something working by cloning https://github.com/qt-creator/qt-creator , removing the relevant 2 lines from src/plugins/texteditor/texteditor.cpp and building it with qmake -r ; make -j8.
                  Column editing works now for me on macOS Mojave 10.14.4, the way I was used to it on Linux with Opt+Shift+Arrow keys.
                  Of course this overwrites the standard functionality of these combinations on a mac, but I consider column editing far superior. If overwriting the standard combinations is the only downside of this solution, I would like to propose making it default.

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post