Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
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
- relates to
-
QTBUG-129084 QTextDocument should expose a tree model for an outline view
- Reported