summaryrefslogtreecommitdiffstats
path: root/tests/manual/widgets
Commit message (Collapse)AuthorAgeFilesLines
* QHeaderView - fix a logical / visual index mismatchThorbjørn Martsum2015-06-271-1/+3
| | | | | | | | | | | f9408317e70bc2e635a2f9baeff35d1c06227734 was unfortunately approved though it had an annoying bug. The patch had an assign of a visual index into a logical index. This patch fixes that issue. Change-Id: I9cc75e4e9701858c92e2c3e5817415041b42f8e8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1112-73/+73
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Auto-scroll while selecting entire rows/columns did not workJan Arve Saether2014-11-291-11/+152
| | | | | | | | | | | | | | | If you press and hold a section in a header view you can extend the selection to more rows by moving the mouse. This worked fine until you moved the mouse outside the geometry of the header view. The expected behavior was then to scroll the view (this is what happens with extended selections on regular table cells). [ChangeLog][QtWidgets][QHeaderView] Auto-scroll the view when making extended row/column selections. Change-Id: Ic65aa34d370e74054b2123ab57edb1add0e8adb9 Task-number: QTBUG-21201 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Update license headers and add new license filesMatti Paaso2014-09-2412-217/+121
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix key navigation through cells with spans in QTableView.Mitch Curtis2014-06-063-1/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When navigating with the directional keys or tab/backtab, there are certain situations where the cell that is edited is incorrect. For example, consider the table below. '^' represents the starting cell and the direction of navigation. 'c' represents the index that is arrived at as the currentIndex prior to this patch as reported by view.selectionModel()->currentIndex(). 'x' is the cell that should be edited: +---+---+---+---+ | | | e | | +---+---+---+---+ | | x | | +---+ +---+ | | c | | +---+---+---+---+ | | | ^ | | +---+---+---+---+ Before this patch, the cell that will actually be edited is c, rather than x, so after editing the cell and pressing enter, the previous contents of the cell will still be shown. With this patch, currentIndex() will be changed after every call to cursorMove(). Navigation into and out of cells is not affected because the visualCursor member in the QTableViewPrivate tracks the keyboard navigation entry point. If after the up navigation into the span, the user presses up, the cell entered is 'e', not the cell above 'x'. Task-number: QTBUG-29239 [ChangeLog][QtWidgets][QTableView][QTableWidget] currentIndex() now reflects the top left cell when in a span. Change-Id: I3dc3db46ebba340102860fc4ad98fcaf91484983 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fixup compilation of the manual testsJorgen Lind2014-03-226-0/+0
| | | | | Change-Id: I871b0e7c1c4336b45e880023e7374f579e018cd6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QHeaderView - remove confusing boolThorbjørn Martsum2013-11-083-3/+7
| | | | | | | | | | It is probably better not to have a default boolean in QHeaderView::setResizeContentsPrecision Task-number: QTBUG-34665 Change-Id: I0bb2c35abc1d5713bb3ee65df3af86c04f175a38 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add widget replace function to QLayoutThorbjørn Lund Martsum2013-09-213-1/+140
| | | | | | | Sometimes it is nice to be able to replace a widget in a layout. Change-Id: I23a6a65e417e94d53bc48639503db1a142bc3f10 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QTreeView - fix next focus when there is no current indexThorbjørn Martsum2013-08-301-1/+2
| | | | | | | | | | | | | | | | Before we went through non hidden indexes, but we never considered the visual order. This patch fixes that issue. Though it was wrong before, it probably never was a big problem since it was unlikely that the tree (on logical index 0) was swapped or hidden, but 658e42e77a00596b63823482c9b77644556b647c makes it more likely that problems with wrong focus could occur. Change-Id: Ic7b6cd2df1f8638be1a7c9e6df27f428685869fc Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QComboBox - only react on a mouse-release if we had a mousepressThorbjørn Lund Martsum2013-08-211-6/+35
| | | | | | | | | | | | | | | | In delegates we get into trouble with calling showPopup in setEditorData (edit by double click) - and that is not reasonable. The user has requested edit - and therefore it is natural to save a click for the user and show the popup at once. However that fails since we have the mouse down and as soon as we release the mouse we will call hidePopup. This patch ensures that the mouseReleaseEvent, that caused the problem is only considered if we have had a mousePressEvent. Change-Id: Ibe031fcb9ad2158f6969e41127bbb5f651b9cae6 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QTreeView - allow users to control data in the treestructureThorbjørn Lund Martsum2013-08-073-1/+157
| | | | | | | | | | | | | | This patch allows to set which logical index the tree is in. Before the tree always displayed data from the logical index 0, but it is actually more likely that the user wants to have data from visual index 0 (which can be done by special value -1). There is nothing special about logical index 0, and not being able to change the tree-data is just annoying. Change-Id: Ib070ce93343a0d2fbac3ad5a42cb4359401ac87c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QSizePolicy - add retainSizeWhenHiddenThorbjørn Lund Martsum2013-07-103-2/+138
| | | | | | | | | | Sometimes it is nice that hiding a widget does not affect the layout. This patch makes that possible by allowing hidden widgets to take up space. Change-Id: Ifbc1cdee0e112950acc025919b98199ea9558db7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* QStyle - tooltip - add wakeDelay and sleepDelay as styleHintsThorbjørn Martsum2013-07-031-3/+56
| | | | | | | | | | | | | | In earlier patches we allowed the user to control the tooltip duration. However the user still couldn't control the wake delay and sleep delay. This patch changes that and is the final patch in solving: Task-number: QTBUG-1016 Change-Id: I5e2c719737634ad7f371ad03691744612472ae70 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QWidget - add property toolTipDurationThorbjørn Martsum2013-06-251-7/+48
| | | | | | | | | | This adds a property that specifies how long a tooltip is displayed. This partly solves: Task-number: QTBUG-1016 Change-Id: Ieea218bbcb869f6b48e72913d967e74fa792f2e2 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QToolTip - add static showText with time.Thorbjørn Martsum2013-05-274-1/+74
| | | | | | | | | | It is nice to be able to control how long time a tooltip is shown. This is the first part of solving: Task-number: QTBUG-1016 Change-Id: I8e313df8a2acdc5ccc91d9c8ce956c30c76daf4b Reviewed-by: David Faure (KDE) <faure@kde.org>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-233-0/+6
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
| * Build manual test for widgets from toplevel.Friedemann Kleint2013-05-133-0/+6
| | | | | | | | | | | | Change-Id: I411cfc28d2021eed0acf3949a141ffded1acdecc Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | QHeaderView - add parameter to control sizeHint precisionThorbjørn Martsum2013-05-136-0/+378
| | | | | | | | | | | | | | | | | | | | | | Currently Qt looks at 1000 rows when scaling a column. That can be slow in some situations and too inaccurate in others. With this patch we leave it up to the user to decide how precise e.g resizeToContents should be. Change-Id: I6ef60f9a3bb40fc331ce1a1544fdc77488d20ca3 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | QAbstractScrollArea - add SizeAdjustPolicy and viewportSizeHintChristoph Schleifenbaum2013-04-221-9/+26
| | | | | | | | | | | | | | | | | | | | This patch adds SizeAdjustPolicy to QAbstractScrollArea. If it is set to AdjustToContents it will make use of the new protected viewportSizeHint() (BC since it was reserved in Qt5). This function returns a suggested size based on contents. Change-Id: I5d8aa517e88b8b21c5712e62b4d574c3aad99d3b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | GraphicsView - add Q_DECL_OVERRIDE to the manual rubber band testThorbjørn Lund Martsum2013-04-031-2/+2
|/ | | | | | | | This adds Q_DECL_OVERRIDE to the virtual functions in the test. Change-Id: If1b7646c9a6f50c6efe2d03d253bd8e0b4c09716 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Compile most manual tests with Qt 4.Friedemann Kleint2013-03-221-1/+6
| | | | | | | | Replace <QtWidgets> includes by class includes, remove tests that do not compile. Change-Id: I52837e8c567dc8ac365c7d43c37beb9a368f6f72 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Clean up manual test to QGraphicsView (rubberband)Thorbjørn Martsum2013-03-011-8/+7
| | | | | | | | | | This cleans a bit up in the manual test by a) Removing a weird reference alloration (and replace . with ->) b) rename for variable from v (which was also the view name) to n. c) remove a big item in the scene rect that is irrelevant to the test Change-Id: I49cb319bcc2f4bceef0c96ca86b571b0240a9a92 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* QGraphicsView - emit signal when rubber band changes.Thorbjørn Lund Martsum2013-02-261-18/+9
| | | | | | | | | | | | | The rubberBandRect function is nice to have, but this patch makes it easier to track the rubber band by emiting a signal on change. That makes it easier (and less clumsy/hacky) to show information related to the rubber band. Change-Id: If65eb85d743a1804be3fdb823a821423411e9745 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QGraphicsView - add function to get RubberBand rectThorbjørn Lund Martsum2013-02-261-3/+34
| | | | | | | | | | | | | | In many situations it is handy to know the rubberband rect. There are many situations where we want to show something related to the rubberband. Regardless how that is done the rubberband area is needed. (Not having this is a flaw that can force people to do make a customized rubberband just to get this information) Change-Id: Ia854db4c0022b6a97b150af2b4bb78fd5e974991 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge branch 'stable' into devFrederik Gladhorn2013-01-041-7/+14
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/painting/shared/shared.pri src/corelib/tools/qharfbuzz_p.h src/corelib/tools/qunicodetools.cpp src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
| * QGraphicsView - fix rubberband to expand on wheel eventThorbjørn Lund Martsum2012-12-111-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In SHA 51914375b615ddcac711171ac31779fea01b4323 the rubberband selection was fixed, so it followed the scene-point on mousemove. However wheelEvent could move the view - but avoid update of the rubberband (that would not be updated until next mouse-move). This patch fixes that (and generally improves rubberband behavior) since QGraphicsViewPrivate::mouseMoveEventHandler is called by replayLastMouseEvent, which is called from various places, where we need to update the rubberband (e.g scrollContentsBy). Change-Id: I1b78c27edaaecea797a2319086d7a11d437d2bd3 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QAbstractItemView - allow deselect in single selection mode.Thorbjørn Lund Martsum2013-01-021-0/+3
|/ | | | | | | | | This patch allows single selection to be cleared with the normal control modifier. This affects e.g QTreeView and QListView. Task-number: QTBUG-8836 Change-Id: I7fd50b987acc3552b36657409568192763257536 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QGraphicsView - fix rubberband to stay right on scrollThorbjørn Lund Martsum2012-12-012-0/+103
| | | | | | | | | | | | | | We should consider the scene-position when we are expanding moving a rubberband. If the user does some auto-scroll (Qt should support that itself, but that is another matter) then the rubberband should not keep the (old) local position to calculate the rubberband extension, but instead use the scene-position that was actually clicked. Change-Id: I04a2df6a1edae8b3587e1ac2104c7fe4ccfb7762 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QHeaderView: - avoid cursor move on setDefaultSectionSizeThorbjørn Lund Martsum2012-11-251-2/+1
| | | | | | | | | | | If we are reacting on the sectionResized signal and we call setDefaultSectionSize we should ensure that we are not moving the mouse-cursor. This is an improvement of f8f6acb05ce9aa5fccc329bf5587adf14ed9a710 Change-Id: I1adee7821bc8fcc9633f692bfd515f2c458b12c8 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QHeaderView - Fix auto-scroll on manual move on sectionsThorbjørn Lund Martsum2012-11-231-5/+5
| | | | | | | | | | | | | This patch fixes the manual move of sections when auto scroll is on. It is done in QAbstractItemView::doAutoScroll by letting the qheaderView use its parents scrollbars if they are childs of a QTableView or QTreeView. Task-number: QTBUG-993 Task-number: QTBUG-1103 Change-Id: I70d999d9a07c3566e42d01cc5ebb47a69a83d9d4 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Qt 5.0 QTreeView. Prevent manual moving of the first sectionThorbjørn Lund Martsum2012-11-023-2/+61
| | | | | | | | | | | | | | | | | | This prevents the user of moving the leftmost column. There will be no API to allow move of the tree-structure. It is very weird to do that, so it shouldn't be a problem. In case it is a big problem somewhere it can be hacked with: QTableView unused; unused.setVerticalHeader(tree->header()); tree->header()->setParent(tree); unused.setVerticalHeader(new QHeaderView(Qt::Horizontal)); Task-number: QTBUG-332 Change-Id: I3a251c8d0fd472ec0ad7edb20a7f3e00af7e0da8 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* normalise signal/slot signatures [QtWidgets tests]Marc Mutz2012-10-191-1/+1
| | | | | Change-Id: Iffab60f0911a55e4be09faeb29df0bae1ea2eb19 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-222-46/+46
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-012-0/+2
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QHeaderView - resizeSection improvementThorbjørn Lund Martsum2012-07-052-0/+113
| | | | | | | | | | | | | | | | | This patch improves the manual resizeSection a bit. Before we didn't consider that the program could maybe resize other sections when the user was resizing one section. The main issue with that is that setOffset is so smart that it helps moving the mouse cursor - however it really shouldn't do if the program is trying to change something too. Maybe this won't solve all (possible) problems at once - but it is a fixed needed just to make something work - trying to make anything work without this fix is horrible.... Change-Id: I3cefa375a9b8ee4c1ef1e08ba0900025c671e4c6 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Build manual tests.Friedemann Kleint2012-04-121-0/+1
| | | | | | | | Add a toplevel manual.pro and other .pro-files to build them and fix the build. Change-Id: Ibc98a27b39dd1304edfa8a6894d62e77ce7ef387 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Introduce QItemDelegate::destroyEditor virtual invoked at editor closeThorbjørn Lund Martsum2012-02-022-0/+88
This provides a stronger mechanism e.g when inheriting QItemDelegate. It makes some things much easier e.g avoid delete of an editor and maybe only delete depending on what the editor says itself. This introduces a new virtual function. Task-number: QTBUG-2299 Change-Id: I8410f8199775987dbacffd99e4c354fdadcdd21f Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>