Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-129083

add table row/column selection to text editors; or use TableView

    XMLWordPrintable

Details

    Description

      In many word processors, if your document contains a table, while you hover the cursor over the top edge, the cursor changes to a "down arrow" to indicate that you can select the whole column; clicking does so. Sometimes you can select rows that way too. Usually there are context menu entries to insert a row or column beside the selected one, on either side.

      We have a rudimentary ability to select text from columns in QTextEdit, it seems, but not in TextEdit. We have always been missing the whole-column/whole-row selection features as implemented elsewhere. Perhaps column/row insertion is already possible, but not demonstrated. Perhaps we should have a default context menu, or make it really easy to build such a context menu and demonstrate how to do those insertions in relevant examples, in Qt Quick and in widgets.

      An alternative approach would be to use TableView as a delegate in TextEdit, in Qt Quick. (Or in widgets, use QTableView as a component in QTextView.) This would save the trouble of adding more mouse-event-handling featuires in QQuickTextControl, and would enable adding other features later on. (Since it inherits Flickable though, we could allow large scrollable tables inside documents; but that has questionable usability.) To that end, QTextDocument should expose each of its tables as a QAbstractItemModel subclass.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes