aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual
Commit message (Collapse)AuthorAgeFilesLines
* Retire the qt_parse_all_argumentsAmir Masoud Abdol2023-01-203-3/+3
| | | | | | Task-number: QTBUG-99238 Change-Id: Ia11c9cbd7c06347319ab3674ec0cd8da0214747e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QQuickTableView: reposition selection handles whenever TableView updates the ↵Richard Moe Gustavsen2023-01-201-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | layout After TableView got support for resizable rows and columns, a side effect is that any overlay, like the selection handles, will need to be repositioned when rows and columns are resized. Currenly the selection handles will instead stay put at the initial location. This patch will make sure that SelectionRectangle listens to the layoutChanged() signal from TableView, and reposition the handles. Because the current selection rectangle implementation in TableView didn't take row and column resizing into account either, the logic that calculates the rectangle is also changed. Rather than storing the selection rectangle after each mouse drag, we now calculate the exact (and updated) rectangle when queried instead. Fixes: QTBUG-109448 Pick-to: 6.5 Change-Id: I80171f992bea1035c1410ede384a2d847ee3aa46 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fusion, HeaderView: use colors from the styleRichard Moe Gustavsen2023-01-171-7/+13
| | | | | | | | | | | | | | | | | | | Don't hard code colors in HorizontalHeaderView and VerticalHeaderView. Instead, use colors from the palette / style. This ensures that switching between light and dark mode will also affect HeaderView. Additionally, skip drawing a box around the header view cells - doing so ends up looking quite bad, since you will draw double lines between the cells (especially when the columnSpace/rowSpace is 0. Instead, the border around the cells in both TableView and HeaderView is supposed to be drawn indirectly from setting rowSpacing and columnSpacing to e.g 1. Pick-to: 6.5 6.4 Change-Id: Ibc01779526aecc4f0d40fad2a6f2ea2822427e85 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Exclude the manual test of text from build when building QtAlexey Edelev2023-01-051-1/+1
| | | | | | | | | | | | The test uses public API and tries to look for packages that do not exist when builing the test with qtdeclarative. Exclude the test from Qt builds. The test still can be build mnually using qt-cmake outside the Qt build tree. Fixes: QTBUG-109473 Change-Id: I3af914ffbacf10d8a984a074e92396f7056549dc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* testbench: save search text between sessionMitch Curtis2023-01-035-4/+22
| | | | | | | | | | | | | | This makes using the testbench more convenient, as you don't need to search for the controls you're interested in each time you run it. Also added an extra font icon (clear), which required regenerating the set from fontello. The same license is still applicable since they're from Font Awesome. Pick-to: 6.5 Change-Id: I9b44f7f8bce0bb4032071c19186eb5affbfe42a5 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Update Material Switch to Material 3Mitch Curtis2022-12-123-1/+77
| | | | | | Fixes: QTBUG-108555 Change-Id: I6c17812c9cf0dab71ac212ab7cb28cad646f9dfc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQQuickTreeView: double expand from TreeView, not TreeViewDelegateRichard Moe Gustavsen2022-12-091-4/+0
| | | | | | | | | | | | | | | | We should ideally implement as much mouse logic as possible outside the delegate. This will make it easier to implement custom delegates, since you would then only have to care about the visuals, and not the mouse logic. Therefore, move the doubleTap-to-toggle-expanded logic out of TreeViewDelegate, and into TreeView, for all custom delegates to enjoy. Change-Id: I01f49252d35fed033f162d7bab47478abefe73d1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge "Merge remote-tracking branch 'origin/wip/material3' into dev"Liang Qi2022-12-099-2/+498
|\
| * Merge remote-tracking branch 'origin/wip/material3' into devLiang Qi2022-12-089-2/+498
| |\ | | | | | | | | | Change-Id: Iebc21fd341884dc9fbcf394a29c856727129db6d
| | * Move manual test for material stylewip/material3Paul Wicking2022-12-078-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | After the renaming, tests/manual/quickcontrols2 is now tests/manual/quickcontrols. Change-Id: I95b34c68b6e684052e98a4bf0561beb9c9750efe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Merge remote-tracking branch 'origin/dev' into wip/material3Paul Wicking2022-12-05209-88/+168
| | |\ | | | | | | | | | | | | Change-Id: I55ec34220c5b9001893fc924ab6be7fd64e63a02
| | * | material manual test: store theme etc. in settingsMitch Curtis2022-11-282-12/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch stores the following data in settings: - window geometry - theme - variant - last selected control This makes it much more convenient to use. Task-number: QTBUG-97993 Change-Id: I0a0dfa2bc4dfac8b05193e0dab2abf9f83851945 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * | material manual test: add dense switchMitch Curtis2022-11-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-97993 Change-Id: I75dc3e09cd592890e87dc40efd6cb52342116dcc Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| | * | material manual test: add dark theme switchMitch Curtis2022-11-241-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-97993 Change-Id: I0b298702790195548c11373d0d899ce499b0dc7b Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
| | * | Update Material DelayButton to Material 3Mitch Curtis2022-11-213-1/+75
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-108354 Change-Id: If856e46f1e9fb46bbbe570f68048a6d5091398bc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | Update Material RoundButton to Material 3Mitch Curtis2022-11-213-1/+95
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-108355 Change-Id: Ia7c985da7d15c8036ab761b6d54311a093a57af6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | Update Material Button to Material 3Mitch Curtis2022-11-212-42/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove the checkable indicator (PaddedRectangle instance), since it no longer looks good with fully rounded corners. It seems to come from ToggleButton: https://developer.android.com/develop/ui/views/components/togglebutton The screenshots in the linked bug report show that even Android's latest ToggleButton doesn't fit in with the default fully rounded corners. Instead, checked buttons now use the accent color for their text. Highlighted buttons are the exception, as it would result in a lack of contrast between the background and the text. - Reduce the Angular blur values by 1/4 for all elevations (except zero) so that the shadow isn't so huge. Also, use higher "strength" on the lower ones as well, so that they are not so spread out and are instead small and sharp, matching the Material 3 guidelines and getting closer to reflecting the appearance of a real shadow. - Fix zero elevation buttons with no explicitly specified background color having a transparent background, taking care to ensure that flat buttons still have a transparent background. Fixes: QTBUG-108052 Change-Id: If4c7bee47b79e4317dd4c7bb0c4dfd4d4f58ecaf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * | Add Constants singleton to material manual testMitch Curtis2022-11-214-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove some hard-coded values that would have become duplicated in subsequent patches. Task-number: QTBUG-97993 Change-Id: Iaeabc330bd26525528c3d976b9d911e3871ee9e9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | Add material manual testMitch Curtis2022-11-214-0/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to be able to see combinations of Material-specific states like elevation and roundedScale, and testbench is supposed to support all styles, so this patch adds a new manual test specifically for the Material style. Task-number: QTBUG-97993 Task-number: QTBUG-108052 Change-Id: I5752ff08520c62f47d29af10c7d6ab27fcf40894 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | QQuickTreeViewDelegate: implement edit delegatesRichard Moe Gustavsen2022-12-083-0/+9
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will implement a default edit delegate for the TreeViewDelegates, for all our styles. [ChangeLog][Controls] TreeViewDelegate got support for editing nodes in the tree. Change-Id: Iec5936e4439770586837daa3b8045482b75a15f2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | / QQuickTableView: let the edit delegate be a child of the cell delegateRichard Moe Gustavsen2022-12-071-9/+5
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first version parented the edit delegate to the content item of QQuickTableView. This approach, however, turned out make it really difficult to implement an edit delegate that relied on the geometry of items inside the tableview delegate. E.g for a TreeViewDelegate, we would like to show an editable TextField on top of the label while editing. But only on top of the label, not the whole delegate (including e.g the expanded/collapsed indicator). Moreover, we don't want to hide the whole delegate while editing, only the label that is underneatch (a possible semi-transparent) edit delegate. For this to be possible, we therefore need to parent the edit delegate to the TableView delegate instead, so that the edit delegate can e.g more easily query the geometry of the items inside the delegate (like the label) to position its own items (like a TextField). Since we also want the developer to then have more control over which items get hidden, we offer a property: "required property bool editing" to the tableview delegate. This can be used to e.g hide items inside the delegate while its being edited (or to implement other kinds of transitions). This new solution should also be easier to work with, and understand, for application developers, since the parent-child structure now mirrors the location where the edit delegate is written in QML. Change-Id: Ieeae28c8297f8bb1fb2d90d152fd575b4f41f36f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | QQuickTableView: implement TableView.editDelegateRichard Moe Gustavsen2022-12-012-45/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will implement support for editing cells in TableView. It enables you to attach an edit delegate to the tableview delegate, using the attached property TableView.editDelegate. The application can initiate editing by calling TableView.edit() (and TableView.closeEditor()) explicitly, or implicitly by using edit triggers. The EditTriggers enum in TableView mirrors the EditTriggers in QTableView (Widgets). [ChangeLog][Quick][TableView] Added support for editing cells Fixes: QTBUG-108838 Change-Id: I25df93a7eeabf9d8a4c4c6248e020d8eba6d5bd7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Doc: remove "2" from Qt Quick Controls filesMitch Curtis2022-12-0140-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | Work on this was already started for the documentation in 1abdfe5d5a052f2298b7bf657513dfa7e0c66a56. The CMake target (docs_QuickControls2) probably can't be renamed until we rename the library, which won't happen until Qt 7. Task-number: QTBUG-95413 Change-Id: Ied20805a91286436606577c3de39671a447f27dd Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Remove "2" from Qt Quick Controls directoriesMitch Curtis2022-12-01207-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Quick Controls 2 was named that way because it was a follow-up to Qt Quick Controls 1.x. Now that Qt Quick Controls 1 is no longer supported, we don't need to have "2" in the name. Work on this was already started for the documentation in 1abdfe5d5a052f2298b7bf657513dfa7e0c66a56. By doing this renaming a few weeks before feature freeze, it won't affect the release but still results in as little time possible spent manually fixing conflicts in cherry-picks from non-LTS releases as a result of the renaming. This patch does the following: - Renames directories. - Adapts CMakeLists.txt and other files to account for the new paths. A follow-up patch will handle documentation. It does not touch library names or other user-facing stuff, as that will have to be done in Qt 7. Task-number: QTBUG-95413 Change-Id: I170d8db19033ee71e495ff0c5c1a517a41ed7634 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* PinchHandler null target: remember accumulated scale between pinchesShawn Rutledge2022-11-171-0/+50
| | | | | | | | | | | | | | | | | | | | This restores behavior from b4d31c9ff5f0c5821ea127c663532d9fc2cae43e which got broken in fc636af3a723ee8b4ee42cf71864ae0df5ca4621. As documented, PinchHandler.scale is the accumulated scale that would be applied to the target item (even if there is no target), whereas activeScale is the scale during one pinch gesture. After the first gesture, these two values are supposed to diverge, even if there is no target; that way you can bind scale to some property, to scale something else in the same way that PinchHandler would normally scale its target. Pick-to: 6.2 6.4 Fixes: QTBUG-108549 Task-number: QTBUG-68941 Task-number: QTBUG-92064 Change-Id: I32ff37e394fd8466128603eddd5697ba1cc1a0ed Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQuickTableView: implement support for letting the user resize rows and columnsRichard Moe Gustavsen2022-11-093-160/+450
| | | | | | | | | | | | | | | | | | | | | | | | | This patch will add support to TableView for resizing rows and columns by dragging between the cells. To achieve this, a custom pointer handler (QQuickTableViewResizeHandler) is implemented. This handler can detect if the pointer is hovering between the cells, and if the user starts a drag. This information is used to call out to the new setColumnWidth()/setRowHeight() API for adjusting the row and column sizes while the user is dragging. The pointer handler is careful to make sure that you can only start to resize by dragging _between_ the cells. If the drag starts elsewhere, the solution will fall back to normal contentItem dragging/flicking instead. Resizing is off by default. The user can enable it by setting the resizableRows/resizableColumns properties. In addition, an API that lets you query the state of the resizing has been added. [ChangeLog][Quick][TableView] Added resizableColumns and resizableRows properties to enable resizing by dragging between cells. Change-Id: I05d4170f30b8c6461a5877c2b831a1ab044d2b5b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* testbench: add icons to buttonsMitch Curtis2022-11-031-1/+24
| | | | | | | | | This lets us quickly check if buttons with icons look as expected. Task-number: QTBUG-108052 Pick-to: 6.2 6.4 Change-Id: Ibb5d5fbbde66b0eeea3479e86d91173841de662d Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* testbench: set checkable for checked buttonsMitch Curtis2022-11-021-5/+5
| | | | | | | | | | As of 4f73c07b529d2437e72bfdf4c1a75f83e2bdbe76 (6.2), setting checked to true doesn't also set checkable to true, so this must now be done manually. Pick-to: 6.2 6.4 Change-Id: I9b2b7892f5ae2179ab183de9ea163c4baca140f6 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Pointer Handlers manual test: nested DragHandlersShawn Rutledge2022-10-111-0/+50
| | | | | | | | This is one way of verifying that grabPermissions have the desired effect when one DragHandler needs to steal another's exclusive grab. Change-Id: I6aba3c7fe8dfaa5bfb3e6c0ccb36736829b47c37 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Move Settings out of Qt.labs moduleYuhang Zhao2022-09-292-5/+4
| | | | | | | | | | | | | | Move Settings from the Qt.labs module to the QtCore module. And deprecate the original one in Qt.labs. Also changed the fileName(QString) property to location(QUrl) to better fit the Qt API. Adjust the tests accordingly. Task-number: QTBUG-92806 Change-Id: I1cbad1315383a9f2963583fd4d00cf3612f99f1e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QuickControls2: implement icons for submenusVladimir Belyavsky2022-09-201-0/+13
| | | | | | | | | | | | | | | | Previously in Qt 5 there was an option to define iconSource property in Controls 1 Menu. But it's missed in Controls 2, so it's not possible to use icon for submenu item in Qt 6. This patch introduces icon group property for the Menu so that it behaves and displayed the same as for regular menu items. [ChangeLog][QtQuick][Controls] Now it's possible to set icon for Menu. This is useful for submenus, so icon will be displayed as for regular menu items. Fixes: QTBUG-79972 Change-Id: I4610d4b6d40c51b774b035e238e5e1ceea53a8a3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-09-0738-38/+38
| | | | | | | Task-number: QTBUG-105718 Change-Id: Id89ed14990804a5024183e75382cc539d4293da1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Skip text manual test for top-level buildsJoerg Bornemann2022-08-091-0/+11
| | | | | | | | Otherwise configuration fails due to not finding moc for AUTOMOC due to the tests using non-internal target creation APIs. Change-Id: I7df3d395bd253f5bc943fab8218aa9611ad8a02a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Rename tests to be unique for top-level buildsAlexandru Croitor2022-07-283-7/+7
| | | | | | | Pick-to: 6.4 Task-number: QTBUG-105238 Change-Id: I5037d942818d96b8f6cc474a81c56362df0fd01d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-2831-32/+32
| | | | | Change-Id: I1cd769f85d5f82c43639d6787d98e536619249e6 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* testbench: revert debugging codeMitch Curtis2022-07-261-1/+0
| | | | | | | | | This was accidentally left in as part of e987d6029727ed22d12971080ae905732654f93f. Pick-to: 6.2 6.3 6.4 Change-Id: I918aaf18a80d8460a357a2d097f02ee9917e33d5 Reviewed-by: Doris Verria <doris.verria@qt.io>
* Imagine: don't show hover effects when disabledMitch Curtis2022-07-201-0/+1
| | | | | | | | | | | 831efa14e91cfa358e57a32197578d41c2ae1b24 made disabled items get hover events, so we need to check if a control is disabled before showing hover effects. Task-number: QTBUG-94919 Pick-to: 6.2 6.3 6.4 Change-Id: Iee93a053780e7c3c604ae62a99665fdc83be5421 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add checkbox for enabled property in text manual testShawn Rutledge2022-07-191-2/+13
| | | | | | | | ...to verify whether we show hover effects when it's disabled, in various styles. Change-Id: I445eae55c521349d6246e32fdc42065ff544f797 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* testbench: clean up DelayButton pageMitch Curtis2022-07-151-3/+2
| | | | | | | | | - Uncomment code which is needed to visualize states. - Remove print statements. Pick-to: 6.2 6.3 6.4 Change-Id: If0d0cc65fb51f842f6030f7dbd99e02ae1e835d3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Test all 4 field types in the text manual testShawn Rutledge2022-07-095-89/+415
| | | | | | | | | | | | - TextInput, TextField, TextEdit and TextArea: side-by-side comparison - check whether mouse selection is already enabled, and allow changing - check various other properties and signals - stop using the shared examples code so we no longer need resources - make CMakeLists.txt work for a standalone build on multiple platforms Task-number: QTBUG-101205 Change-Id: I3dc7a91c9d129d185e976d02b010cb298e0ad737 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-0838-0/+114
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I72c89a98c42bbc9234d8495e9e503bec81d11037 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Let Controls inherit palettes and fonts from parentsJiDe Zhang2022-07-081-30/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Item's palette property and Control's font property returns the resolved value; its resolveMask is inherited from parent object, when the return value is used in the qml. For example: ApplicationWindow { id: window palette { window: "blue"; windowText: "blue" } Control { id: control } Button { onClicked: { control.palette.window = "red" window.palette.windowText = "red" console.log(control.palette.windowText) } } } In Button.onClicked, `control.palette` is the `resolvedPalette` of Control, it's resolveMask is not 0. Next, the new value is assigned to the control, then the control's "requestedPalette" will change to the new value, and it's resolveMask also is not 0. Next, `window.palette.windowText = "red"` changes the `windowText` palette for the window; QQuickPaletteColorProvider::inheritPalette() will be called. Because the resolveMask of `requestedPalette` is equal to the new palette, the control will not inherit any colors from its parent. So `console.log(control.palette.windowText)` was printing `qml: #0000ff`, but the right result is `qml: #ff0000`. When PaletteProvider is missing the inherited struct, fallbackPalette is now used as parentPalette. [ChangeLog][Controls] Controls now inherit palette and font from parents. Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Done-With: yeshanshan <yeshanshan@uniontech.com> Done-With: Shawn Rutledge <shawn.rutledge@qt.io> Pick-to: 6.4 Fixes: QTBUG-101480 Change-Id: Ibe400f647512331352bf34dee42f908fb7a8d914 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-11279-11422/+559
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* FileDialog: make selectedFile writableMitch Curtis2022-06-021-1/+1
| | | | | | | | | | | | This allows setting an initially selected file. [ChangeLog][QtQuickDialogs] FileDialog's selectedFile property can now be set to an initially selected file. Fixes: QTBUG-101975 Pick-to: 6.3 Change-Id: I399f9379e1ac54917edbc31f9029d5522a914340 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add ColorDialog to QtQuick.DialogsOliver Eftevaag2022-05-314-1/+199
| | | | | | | | | | | | | | [ChangeLog][QtQuickDialogs] Added ColorDialog. This is a native dialog on platforms that support it, and a non-native Qt Quick ColorDialog on platforms that don't. The supported styles are Basic, Fusion, Imagine, Material and Universal. Fixes: QTBUG-87796 Change-Id: I7146ca0571c84c9878a4010798e083ee249f273c Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Implement FrameAnimation Quick elementKaj Grönholm2022-05-254-0/+364
| | | | | | | | | | | | | | | | | FrameAnimation is a helper synchronized to animation frame updates which can be used for custom animations and similar needs. Compared to QML Timer element, it doesn't allow setting the interval or repeat properties. Instead, it is triggered on animation updates and provides useful properties like frame number and frameTime & smoothFrameTime for fps-independent animation steps. Also it is directly synchronized with QAbstractAnimationJob instead of going though an extra Qt event loop like the QML Timer. Contains autotest and manual test. Task-number: QTBUG-102641 Change-Id: I5c72992462aba651b6fe8f2846baac3346799c56 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QQuickFlickable: fix flicking when item is rotatedShawn Rutledge2022-05-111-0/+84
| | | | | | | | | | | | | | | | | | | | | QEventPoint::velocity() is in screen coordinates, as documented; it needs to be transformed to local coordinates in case the Flickable is rotated and/or scaled. windowToItemTransform() gives us a composite transform matrix; we remove the translation components to get only the rotation and scaling. Also fix the press position calculation in handleReleaseEvent(). With the manual test one can pinch to scale and rotate a Flickable, then verify that with a single finger, the Flickable gets scrolled by an appropriate distance in spite of that. Done-with: Ivan Solovev Fixes: QTBUG-99639 Pick-to: 6.3 6.2 Change-Id: I60af1dd932835d358baa1422523cc24b2ab046a0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Quick Animations: Fix crashFabian Kosmale2022-05-041-0/+74
| | | | | | | | | | | | SwipeDelegate causes the running animation job to be deleted when calling swipe.close in swipe.completed. Employ the RETURN_IF_DELETED check in more places to avoid crashes. Fixes: QTBUG-100560 Task-number: QTBUG-103223 Pick-to: 6.3 6.2 5.15 Change-Id: I276eeaa9aed1bdb36449b322a24641fa02c4d5e4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQuickTableView: keep selection model and tableview model in syncRichard Moe Gustavsen2022-04-111-3/+1
| | | | | | | | | | | | | | | The source model in the selection model will always need to be the same as the source model in TableView. So TableView might as well forward its own model to the selection model, so that the user don't need to worry about setting the model explicitly. The same is also done in QTableView. Still, it's always possible to force (perhaps by accident?) the two models to be different. To avoid confusion, we choose to print a warning if that happens. Change-Id: I9fec1d3de4cfe83cf28950ebdedd38a010df16a3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* manual test: add hoverpropagation testRichard Moe Gustavsen2022-03-281-0/+281
| | | | | Change-Id: If3cd93830c9ec7645d801cc9ad1dc31fc2551484 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>