aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/tableview
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix QDoc warningsPaul Wicking2018-10-012-13/+13
| | | | | Change-Id: I19545953bde10d4ccc2f37843dcda2569dc77df4 Reviewed-by: Martin Smith <martin.smith@qt.io>
* QQuickTableView: override fixup() to preserve contentX/Y at start-upRichard Moe Gustavsen2018-09-111-5/+2
| | | | | | | | | | | | | | | | Flickable::fixup() will be called from Flickable::componentComplete(). fixup() is a virtual function that subclasses can override to e.g ensure that cells snap to grid etc (which is not yet supported by TableView). The default implementation will check if the assigned contentX/Y is within the current content item size, and adjust it back to 0,0 if not. The problem is that during componentComplete(), the table has not yet been built. And we don't want Flickable to reset any assignments to contentX/Y until that has happened. So override the function and block it from doing any adjustments before the table has been built. Change-Id: Id6c5a3b5f053f71bf1854573cd5b9dc3ecc9f246 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTableView: don't rebuild table upon querying content sizeRichard Moe Gustavsen2018-09-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | Overriding contentWidth/Height was done to be able to force build the table early if the app needed to know the size of the table already at Component.onCompleted (to e.g center the viewport on the center of the table). But now that we have a forceLayout() function, it's better to require that that function should be called before querying contentWidth/Height at this stage. By not building the table on the fly, we allow the application to bind expressions directly to contentWidth/Height, without being concerned about potential binding loops that can occur as a result of us rebuilding the whole table behind his back. The benefit of this overshadows the need to call forceLayout() explicit for some corner cases. Note that we still redefine the contentWidth/Height properties in TableView so that we can catch if the application sets an explicit contentWidth/Height (which is tested by checkExplicitContentWidthAndHeight()). Change-Id: Ic4499b3939af1cb3a543e4c006023d0d6f12fd3b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Example, GameOfLife: bump import to QtQuick 2.12Richard Moe Gustavsen2018-08-271-1/+1
| | | | | | | | Otherwise TableView will not be available. Change-Id: I57fe6ae5dd28064f87dca8cb4c3b957de25713e1 Reviewed-by: Nicolas Ettlin <nicolas.ettlin@me.com> Reviewed-by: hjk <hjk@qt.io>
* QQuickTableView: move TableView from Qt.labs to QtQuickRichard Moe Gustavsen2018-08-222-2/+0
| | | | | | | | | | | TableView is now ready for Qt-5.12. The only thing missing is documentation, which is currently being written, and on the way. So remove the temporary labs plugin that used to register TableView, and register it together with the other QtQuick items. Change-Id: I7f360eac3934d228904a4133363e336afe0c451a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* TableView Conway's Game of Life exampleNicolas Ettlin2018-08-099-1/+688
| | | | | | | | | | This new example shows how a Conway's Game of Life implementation can be created with QML and the new TableView component. Change-Id: I940210c5e5a0554e6f052ff109070e69e59cab56 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Make a subdirectory for TableView examplesMichael Winkelmann2018-07-139-21/+24
| | | | | | | | This makes more room for more tableview examples. I also added the tableview directory to the quick.pro subdirs. Change-Id: Ia136150ded99c2ec627e122aa676e24a519683a9 Reviewed-by: hjk <hjk@qt.io>
* TableView pixelator exampleMichael Winkelmann2018-07-108-0/+488
Example of a QML TableView with custom table model. Inspired from the original pixelator example from the widget world. Change-Id: Ic33e6d2e9320fe135d56dde92326dd8a606fe109 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>