summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_tableview.qml
Commit message (Collapse)AuthorAgeFilesLines
* test: enable Tests_TableView::test_resize_columns() on b2qtSami Nurmenniemi2017-11-161-2/+0
| | | | | | | | | Test was fixed by commit c84f7554894cef0cbeeba8a61f441286e190a797 in qtbase. Task-number: QTBUG-64523 Change-Id: I86195fe049c61ceab43566d004c8f6e6bfcee041 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* test: skip Tests_TableView::test_resize_columns() on b2qtLiang Qi2017-11-151-1/+1
| | | | | | Task-number: QTBUG-64523 Change-Id: Icc369c1933a725321927f46255bb396800a0ac5d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix tests for boot2qtv5.10.0-alpha1Sami Nurmenniemi2017-08-221-0/+2
| | | | | | | | | | | | | | | | The tests for boot2qt were disabled with commit 555750221ee3850ba70169a2b6854041b434c592. The tests can be enabled since qtdeclarative now fallbacks to software renderer if OpenGL is not supported. Changes needed: - Using grabImage does not work correctly on offscreen platform, so tests relying on it are skipped - Extra 1ms delay is needed between two mouse clicks to get rid of test_activeFocusOnPress() flakiness on software quick renderer Change-Id: Ie985110c171bc395bac0d63cd2fbb94207c63516 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Unify license header usageAntti Kokko2016-02-041-3/+13
| | | | | | | Updated BSD license headers Change-Id: I73d67dbc6dbbe7c58d2b9c301b46fb6163243095 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* BasicTableView: Use ListView's overlay header for the table headerGabriel de Dietrich2015-11-031-1/+4
| | | | | | | | | | | | | | | | | | | | Previoulsy we manually positioned the table header over the table contents, which required some manual tweakings. Since 5.4, ListView support overlay headers that we can use them to clean our code in BasicTableView. There is, however, a small issue on Mac where the vertical scrollbar (specially in non-transient mode) is displayed below the table header. Since the header can't span beyond the ListView boundaries, we need to account for the vertical scrollbar width in the ListView's content width. This patch also updates the Desktop style to set the transientScrollBars property and some small tweaks to the Base style. Change-Id: I4433d0703328f23eadb0ae4563fbef5bba0168db Task-number: QTBUG-34344 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Make TableView sort indicator follow moved columns.Mitch Curtis2015-08-121-0/+48
| | | | | | Change-Id: I7041fbe141f9f95be3e6d5c6a9f0abf543877194 Task-number: QTBUG-44185 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Fix TableView extra row with headerVisible:falseJoni Poikelin2015-06-041-0/+26
| | | | | | Task-number: QTBUG-46468 Change-Id: I6718bc860f26a287ff4580e4844aec225c0f70b7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* BSD license for QML code in testsJ-P Nurmi2015-03-061-22/+26
| | | | | | Change-Id: Ie45c9b8d5a5d7f92e4b835473b0c76e3a83998b5 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Use TabFocusBehavior in QStyleHints in QtQuick.ControlsLiang Qi2015-02-131-1/+1
| | | | | | | The all usages of qt_tab_all_widgets in test were updated. Change-Id: I35393c67f183c4e0695e869553007ea00d38c06a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* BasicTableView refactoring: Separate view from user interactionGabriel de Dietrich2015-02-121-2/+2
| | | | | | | | | | | | | | | | | | One of the main tasks of the user interaction code is to manage the current items selection. However, in the upcoming TreeView, the selection will be completely different, but we still want to keep 99% of the view code. Also, in our TreeView implementation, the user's model is proxyfied by a TreeModelAdaptor. But that's not the case in the TableView. So, in order to keep using the same API, we introduce the __model intermediate property. Where it makes sense, TableView and TreeView share common API through BasicTableView. Change-Id: I0a922c1c1093919df7d880d72fe12ed0f372cc08 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Tests: update license headersJ-P Nurmi2015-02-111-29/+25
| | | | | | | Change-Id: I364c2ee1983f59f4c1b3e4e411b46f71c85599ee Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* TableView: correct event.accepted in key handlersLiang Qi2014-10-091-0/+49
| | | | | | | | Autotest is included. Task-number: QTBUG-41444 Change-Id: Ia3120b62a58361fbb13cd06e9c17b0e511cecace Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Controls: Fixed support for Keys attached property on TableViewLiang Qi2014-10-081-0/+31
| | | | | | | | | | | | | | | By forwarding key events from the internal control. The key events from internal are Keys.forwardTo TableView, then user could customize their own behavior. Autotest are included. [ChangeLog][TableView] Fixed support for Keys attached property, by forwarding key events from the internal control. Change-Id: Ic59273ae2589bf6d1a0ccf5babf8fd1741376e6c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-161-0/+29
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf src/controls/Styles/Base/ComboBoxStyle.qml Change-Id: Iaf45bc77be0bd80d21af49a5663dc9fba3caa0da
| * TableView: fix tab navigationJ-P Nurmi2014-09-101-0/+24
| | | | | | | | | | | | Task-number: QTBUG-41202 Change-Id: I13c420dd1443c152053ac331da7bfe5a9fbc9603 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * tst_tableview: cleanup test items to avoid side effects in later testsJ-P Nurmi2014-09-101-0/+5
| | | | | | | | | | Change-Id: I2027a4576529accb623045d4ce63c76af723c5e9 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Introduce TableView::pressAndHold(int row) [signal]J-P Nurmi2014-07-141-0/+12
|/ | | | | | | | [ChangeLog][TableView] Introduced a pressAndHold(int row) signal that is emitted when the user presses and holds a row. Change-Id: I823a7fd534fd6fca78831f00e7ecbb9f2118e006 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Ensure that styleData.row is initialized in delegatesJens Bache-Wiig2014-04-151-0/+18
| | | | | | | | | | | | | While we specifically documented that you should not depend on the value being correct in onCompleted for 5.3, it is not optimal that the initial value is consistently set to 0 and later changed to it's appropriate value. This patch ensures that delegates are not instantiated until after the model model and row values have been fully initialized. Task-number: QTBUG-38307 Change-Id: Ib3300539a0283c997ab8b808fb229d3f22ed6324 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Bump QtQuick.Controls import version to 1.2J-P Nurmi2014-04-071-7/+7
| | | | | Change-Id: Idc0b93cbfc2fe23e8be3bcaece672d06555a81f6 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Import QtQuick 2.2J-P Nurmi2014-04-071-7/+7
| | | | | Change-Id: Ifc9719ec6fbbd80b866c01eebc471d0ed121bd16 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* TableView: fix activeFocusOnTab behaviorLiang Qi2014-02-251-0/+54
| | | | | | | | | | Autotest is included. Task-number: QTBUG-36950 Change-Id: I94c5b5225437ce87365740ea7423b09737dd275a Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* TableView: added resizeToContents and resizeColumnsToContentsShawn Rutledge2014-01-221-0/+16
| | | | | | | | | | | | These are analogous to QTableView::resizeColumnToContents(i) and resizeColumnsToContents(). Double-clicking the header near a width adjustment boundary still provides a means for the user to do this if the application doesn't do it programmatically. Change-Id: Ibded0c9f255301b461dac7080901fc6065fdbe5e Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix TableView auto testFabian Bumberger2014-01-071-2/+2
| | | | | | | This is related to a patch in QtQuick. UpdatePolish will not be called for invisible items any more. Change-Id: If9569fb6272f8f492e4676092be01d6681e696be Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fixed: Regression in key navigation on TableViewJens Bache-Wiig2013-12-211-0/+28
| | | | | | | | | | | | It turns out the currentIndex/CurrentRow was updated but the selection, was ignored for the last row in a TableView. [ChangeLog][Qt Quick Controls][Fixed: TableView regression where the last row in a TableView could not be selected by keyboard.] Task-number: QTBUG-35572 Change-Id: Ifdf11f665733dd63ba56e12fe0dabdd7932a4ab9 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Ignore shift modifier in single selection modeJens Bache-Wiig2013-10-221-0/+31
| | | | | | | | When holding shift in single selection mode, you can incorrectly select multiple rows. This fixes that issue and adds an auto-test. Change-Id: If43846b631e5a3927cf68f69298f71786f664fd0 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Enable TableView multi-row selectionJens Bache-Wiig2013-09-201-0/+219
| | | | | | | | | | | | | | | | This adds a new read-only property selection and selectionMode to TableView with the following features: selection.selectAll() selection.select(from, to) selection.deselect(from, to) selection.forEach(callback) selection.contains(index) selection.selectionChanged() selection.count Change-Id: I3cbd433851354bb68a6075f0b31f46dab8c83fd4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Update imports to 1.1 and remove version from qmlmodule definitionJens Bache-Wiig2013-09-101-7/+7
| | | | | Change-Id: Icb4c6d78225c072da787e4646a55d8cf71a5db7a Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Tests: Fix warnings in testsCaroline Chao2013-07-021-5/+8
| | | | | | | | | | | Ignore warning messages when they are expected. Fix real warnings. Also add missing tst_layout.qml to the test pro file. Change-Id: I2a3835d386570aeb993f275793b3e5e69cc41599 Reviewed-by: Liang Qi <liang.qi@digia.com>
* TableView: let delegates handle mouse eventsCaroline Chao2013-06-191-21/+117
| | | | | | | | | Includes auto tests. Task-number: QTBUG-31206 Change-Id: I683363f70f7e360cc70f84fd460cbde5e70a61af Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix TableView::positionViewAtRow()J-P Nurmi2013-06-111-0/+33
| | | | | | | Task-number: QTBUG-31631 Change-Id: Iaf5bd5c895f0fd94c7ffec19b571786ee9352782 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Updated activation signals in TableViewJens Bache-Wiig2013-06-101-2/+18
| | | | | | | | | | | | | | | - Added row property to activated() - Added clicked(row) signal - Added doubleClicked(row) signal - We also fixed the behavior so that we do not emit activated if the user clicks outside of the available rows. - We fixed a problem where key events would not be seen outside of the control Change-Id: I13feba26e900daf85be7be88216f1a0a4a446c57 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* TableView: Expand to single column and prevent multiple useJens Bache-Wiig2013-05-311-0/+17
| | | | | | | | | | | | This fix ensures that we can only add a TableViewColumn exactly once. It also automatically expands the column with to the viewport when only one column is in use. In addition I have disabled dragging when columnCount == 1 as it was pointless. Change-Id: Ief6011c3e58166907836bf55b0fa6643698192d2 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Revise TableView API for managing the columnsJ-P Nurmi2013-05-291-1/+135
| | | | | | | | | | | | | | | | | | | | Replace "property list<TableViewColumn> columns" with: - addColumn(column) - insertColumn(index, column) - moveColumn(from, to) - removeColumn(index) - getColumn(index) Exposing list<TableViewColumn> type of property in the public API was problematic for several reasons. First of all, it limited the internal implementation too much. Secondly, modifying the list programmatically did not work as expected, and it also threw nasty warnings while reordering the columns interactively. Task-number: QTBUG-30319 Task-number: QTBUG-31028 Change-Id: I0039f7e4be2d6ee9303a4118bdf84146b6a96a05 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Remove currentRowItem and rename positionViewAtIndexJens Bache-Wiig2013-05-161-12/+12
| | | | | | | | | Again trying to make the api a bit more consistent at using row vs. index. Change-Id: I769ca34c7bde628757a19fd47744b5cb1054a154 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* TableView: Fix activated() not emittedCaroline Chao2013-05-071-0/+30
| | | | | | | | | | | | | | | | | | The mousearea in TableView has to accept mouse event in onPressed to receive upcoming double click event. Regression introduced by Iff3e5c1. Instead of not accepting the event in onPressed, set the MouseArea property propagateComposedEvents to true and does not accept the onClicked event. Also uses QStyle::SH_ItemView_ActivateItemOnSingleClick to check if the table is activated on single or double-clicking. By default, it is activated on double-clicking. Change-Id: I744174d7b31efebfae5e8db4db7b99a544ecf50f Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Tests: Add autotests for TableView (rowCount & columnCount)Caroline Chao2013-05-031-0/+18
| | | | | Change-Id: I953d0b1803a69acec04ab4ff542ab4629a4df1c4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Don't select a TableView index by defaultJens Bache-Wiig2013-04-261-0/+23
| | | | | Change-Id: I436849ce43b11dd3b61ef59280e3b8fa39b7da0f Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* TableView: Fix mouse click not forwarded to childCaroline Chao2013-04-251-0/+18
| | | | | | | Add autotest. Change-Id: Iff3e5c1caab506b90bb1a9cd14a418c48280ffe3 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Add missing calls to destroy()Jan Arve Saether2013-04-121-0/+4
| | | | | | | | | | For some reason this also fixes the crash reported in QTCOMPONENTS-1312. At least, I cannot reproduce it anymore. Task-number: QTCOMPONENTS-1312 Change-Id: I88f5f76ad842fcfc055cc7e36299257857ca4503 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Change imports from QtQuick 2.0 to QtQuick 2.1Caroline Chao2013-03-141-1/+1
| | | | | | Change-Id: If9df032c76e36f385aacd30cc31d6f02574c6f11 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* TableView: fixed review findingsJ-P Nurmi2013-03-121-10/+10
| | | | | Change-Id: I78744eb158201bde24c13cd59c2fc7fe30b80ec0 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Replaced BSD with LGPL license to conform with Qt Project modulesShawn Rutledge2013-02-211-1/+1
| | | | | | | | We want to use the same license as the other Qt modules. QML files stay as BSD for now. Change-Id: I10b1484f5ab0dfe2138ff7e045d0ecfd85556aa1 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Rename QtDesktop to QtQuick.ControlsJens Bache-Wiig2013-02-211-0/+169
Change-Id: Icc61dbfc74cc2a303b9847e7d2c7ace4a9002046 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>