This update removes the custom table cell and uses the TableViewDelegate
type as the main TableView's delegate.
Task-number: QTBUG-114636
Change-Id: Icc2fd121d66f2bd1a6102e8575b75abd46940b96
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
The bug occurred when dragging a column over a selected column cells.
The DropArea in TableView attempted to process inconsistent drag data
for all the selected cells (up to 1000), causing the application to
hang.
Fix: Enable DropArea only for dragging TableView cells; disable for
other cases.
Fixes: QTBUG-130928
Pick-to: 6.8
Change-Id: I162a57638d89b97f3f1ef553850e3be3be389f1d
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
The following changes are applied:
- Using ScrollView
- Cut action removes the data from the model
- Selection handle: smaller size, lighter color and border is used
Pick-to: 6.8
Change-Id: Id09c12db5f5c38c2254e1bf81970616e7e84f38d
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The Main.qml file was growing larger due to modifications in header
views. To prevent this, the header views have been separated into
ColumnHeaderView and RowHeaderView QML module types.
Similar to the header views, the tap handlers have been separated into
a QML module type to maintain consistent behavior for header views.
Additionally, the mouse tap handlers have been merged into a single
tap handler to manage mouse events with different combinations of
buttons and modifiers.
Task-number: QTBUG-125767
Pick-to: 6.8
Change-Id: Ib465b8b631cb8fe2aeeaaea229e2c4985619d2e9
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
When MouseArea is used for the header views, it blocks events for the
column/row reordering event handler.
To fix this issue, TapHandler is used instead of MouseArea. With proper
configuration of TapHandler properties, the column/row reordering event
handler can access events when they're not accepted by TapHandler.
Task-number: QTBUG-125767
Pick-to: 6.8
Change-Id: Ie59dfc681bb3d853e0a73a05d46bdcd2607091b0
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
If the user drags a column from outside the visible area and drops it
into the visible area when the column contains a formula that depends
on a visible cell, updating that cell will not update the cell
containing the formula.
The reason is that the update method in the SpreadModel updates the
wrong rows and columns. The visible rows and columns need to be mapped
to the model's rows and columns.
The improvement is that the update uses a mutex instead of enabling or
disabling the connection in the view. However, the blockConnection()
function has been kept because some actions need to update a large
amount of data in the model, and then the view can be updated without
any extra view updates.
The pan and reset_reordering icons are updated. The new icons have
been designed by the designers.
Task-number: QTBUG-125767
Pick-to: 6.8
Change-Id: I20ea1ef0bb777b5b0b04e7ae74df172ffc5b5ed8
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
The HelpDialog is improved by defining an inline component inside it.
The column selection issue is fixed by removing the unnecessary margins
and rows as well.
When the user tries to cut cell data and paste it onto an area including
the cell itself, that cell would be deleted because it was a cut action.
However, this is not correct because the value of that cell is replaced
with the data from the clipboard (mime data) already. To fix this bug,
before deleting the data of the cutting cell, that cell should be
checked to ensure it is not part of the target cells.
Task-number: QTBUG-125767
Pick-to: 6.8
Change-Id: I1adab2c17dab1cf07245bfaed03193904d7d7a2e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The example demonstrates a Spreadsheet that provides adding, editing,
and deleting data, and also the ability to write formulas for numeric
data. Also, it's possible to select cells, rows, and columns for
deleting them or their data, copying or cutting the data, and dragging
them to other places. The user can hide columns or rows, and also show
them again. Thanks to the reordering API, columns and rows can be
reordered and also can be reset to the default order.
There is a SpreadModel class which handles the entered data. It only
stores the data of the cells that is provided by the user. It means
that it does not create any empty data structure for empty cells, in
order to reduce memory usage.
Task-number: QTBUG-125767
Pick-to: 6.8
Change-Id: I1d9cc5b4b8d902257e9ed508d4a712b0574490f3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>