Commit Graph

7 Commits

Author SHA1 Message Date
Richard Moe Gustavsen 1b46ba1e35 TableView: ensure to take spacing into account then loading edges
As it stood, we forgot to take spacing into account when determining
if an edge should be loaded. This meant that we sometimes would
load more edges than necessary when spacing was set to a large value.

Change-Id: I9a2ab96a838d00116aa282b6a40d58a19849936f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-05-14 10:28:02 +00:00
Richard Moe Gustavsen b7b49e3208 TableView: add support for table margins
Instead of always drawing the table at 0,0 in the content
view of the flickable, add support for setting margins.
The margins will let the developer add some extra space
around the table to e.g make space for custom headers etc.

Change-Id: I4a69b2cf3594bd72255d21372b5bf0d3220676dc
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-05-14 10:27:56 +00:00
Richard Moe Gustavsen bbcf4193b3 TableView: ensure we check that returned iterators are not at the end
The current implementation would sometimes just crash because we
didn't check if the returned iterators were pointing to something
valid. This patch will fix this.

Change-Id: Ia45a8e3b701fb9067bf9116f39d7753b88f4f734
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-05-09 11:16:46 +00:00
Richard Moe Gustavsen 5e9fc09f17 tests, qquicktableview: check that the expected number of delegate items are created
Change-Id: I96bc282a6678954d73cf5a15241ac30f43964dcb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-05-09 11:16:32 +00:00
Lars Knoll 1ff97a7dad Revert "tests, qquicktableview: add countDelegateItems()"
This reverts commit 1cfd61f636.
The commit came in during a time where tests aren't run, and fails
at least on some of our linux platforms.

Change-Id: Idd5c68b0fdec06ca93a9bab9604ad64974ee00e3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-05-02 14:20:47 +00:00
Richard Moe Gustavsen 1cfd61f636 tests, qquicktableview: add countDelegateItems()
Change-Id: I1794a46b697467af152a6346fa7d7b5d0ce31807
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-04-27 07:09:40 +00:00
Richard Moe Gustavsen 5e5107493c test, TableView: add boilerplate code for testing TableView
Change-Id: I4d68e033074442c402df11f779b6875e80ec6412
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-04-25 15:31:22 +00:00