Commit Graph

8 Commits

Author SHA1 Message Date
Lucie Gérard 9c5fc88388 Correct license for test files
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I26d72e8de04d4c7c57b3b7838af5d033265de5ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-02-27 10:32:21 +01:00
Richard Moe Gustavsen ed83f0f795 QQuickTableView: implement TableView.editDelegate
This patch will implement support for editing cells
in TableView. It enables you to attach an edit delegate
to the tableview delegate, using the attached property
TableView.editDelegate.

The application can initiate editing by calling TableView.edit()
(and TableView.closeEditor()) explicitly, or implicitly by using
edit triggers. The EditTriggers enum in TableView mirrors the
EditTriggers in QTableView (Widgets).

[ChangeLog][Quick][TableView] Added support for editing cells

Fixes: QTBUG-108838
Change-Id: I25df93a7eeabf9d8a4c4c6248e020d8eba6d5bd7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-12-01 12:01:46 +01:00
Richard Moe Gustavsen 8733b01ce3 QQuickTableView: implement support for letting the user resize rows and columns
This patch will add support to TableView for resizing rows and
columns by dragging between the cells.

To achieve this, a custom pointer handler (QQuickTableViewResizeHandler)
is implemented. This handler can detect if the pointer is hovering
between the cells, and if the user starts a drag. This information is
used to call out to the new setColumnWidth()/setRowHeight() API for
adjusting the row and column sizes while the user is dragging.

The pointer handler is careful to make sure that you can only start to
resize by dragging _between_ the cells. If the drag starts elsewhere, the
solution will fall back to normal contentItem dragging/flicking instead.

Resizing is off by default. The user can enable it by setting the
resizableRows/resizableColumns properties. In addition, an API that
lets you query the state of the resizing has been added.

[ChangeLog][Quick][TableView] Added resizableColumns and
resizableRows properties to enable resizing by dragging between cells.

Change-Id: I05d4170f30b8c6461a5877c2b831a1ab044d2b5b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-11-09 12:15:07 +01:00
Lucie Gérard 0dc4fd240a Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-06-11 08:05:15 +02:00
Tor Arne Vestbø d0eb261836 Remove use of deprecated High-DPI application attributes
Change-Id: Ibfb50fdcbb51ba93d6e5d11f9e8ce0e7b3bfde79
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-09-02 17:17:33 +02:00
Richard Moe Gustavsen 34948d35f6 Manual test, TableView, abstracttablemodel: add more logic to the test
Add buttons for adding and removing rows and columns

Change-Id: I8d391db4f61ff4ec4273adc7134bd30ffc73fa3c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-09-27 06:45:00 +00:00
Richard Moe Gustavsen 9e73c8f3ac test, abstractitemmodel: improve manual test
Improve the test so that you can click on
the cells to change their color.

Change-Id: Ia74620894f2885242f587c4c863bcf3544b13488
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-08-15 08:48:22 +00:00
Richard Moe Gustavsen b17576fe8f Tests: add new manual tests for TableView
This patch will add three new manual tests for testing
TableView.  The first uses a standard ListModel; the second
uses a custom QAbstractTableModel. The third is a port
of the storageview example in widgets.

Change-Id: Ic8ac1aaf9951d0e2982f512b570caa059a212a17
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-04-12 12:30:44 +00:00