Equivalent of excel Alt+Enter in attribute table?

There is another approach I found by chance.

You can transform the cells of your attribute table into Multi-Line Text Edit widgets, that is, switch from a single line editor to a multi-line one.

This is how you do it:

  1. Open QGIS and load a layer.

  2. Right click on the layer and open the Properties dialog.

  3. Go to Properties->Fields and in the row corresponding to your field, click on the button Text Edit to select what widget you want to use when editing.

    enter image description here

  4. Check Multiline and click on OK.

    enter image description here

  5. Open your attribute table and start editing. You can now edit multi-line field values by pressing ENTER when you want to start a new line. When you are done editing a cell value, just click on another cell. This is how the multi-line editor looks like:

    enter image description here


Since there were no answers providing you with shortcuts, I'd like to answer with another workaround based on the Field Calculator.

Start editing string values in the attribute table and insert a special character (I chose _ for the example) that will serve as a delimiter character to wrap to a new line:

enter image description here

Once you have edited the values, open the Field Calculator, select Update existing field, and copy this as Expression ("names" is the field name I edited):

wordwrap( "names", -1, '_')

enter image description here

Click on Ok. Now you have your attribute table with multi-line values. As you mentioned, labels are able to deal with such values, as well as other tools such as identify.

enter image description here

The approach I exposed is good because in a single action (calculating values from an expression in the Field Calculator) you get what you need.


Yes there is an inelegant, but simple way to do this.

Since you are working with property data I'm assuming that you already have tax cards or maybe even a spread sheet.

enter image description here

If you have a carriage return in an excel file or text file, when you copy and paste that data into a cell in the attributes the carriage return is preserved and will show up in your label.

thanks, Scott B