aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix QML markup and module linksDavid Boddie5 days1-2/+2
| | | | | | | | | Prevent auto-linking from occurring in places where QDoc will create an incorrect link. Pick-to: 6.8 6.10 6.11 Change-Id: I8a031a3545ea3a785e0cbe762e84c179899e694f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Examples, StyleKit: ensure that the app can run with qmlpreviewRichard Moe Gustavsen11 days1-0/+1
| | | | | | | Task-number: QTBUG-130067 Pick-to: 6.11 Change-Id: Id27b457908470ea419a8b811c6750ecf8bdfe55f Reviewed-by: Doris Verria <doris.verria@qt.io>
* StyleKit: only emit signals globally for readers of the correct typeRichard Moe Gustavsen13 days1-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | When the application wrote a new value to a property in the style, we used to emit a property changed signal for that property from every StyleKitReader (control) in the application. We did this because we could not easily know which controls would be affected by such a write because of property propagation. This could therefore be very slow. But now that we have more functionallity in StyleKit available, such as being able to resolve a controls base types, we can now improve on this logic. Therefore, this patch will ensure that we instead only emit changes from the StyleKitReaders of the same type (or a base type) as the control written to in the style. The result is that a write from the app, such as: StyleKit.style.groupBox.background.radius = value will cause an update only for groupBoxes, skipping all other controls. This is clearly faster. Task-number: QTBUG-130067 Pick-to: 6.11 Change-Id: I6432db93f282b8155d9270a57206f0d558b801a8 Reviewed-by: Doris Verria <doris.verria@qt.io>
* StyleKit: ensure we hide delegates upon setting 'visible: false'Richard Moe Gustavsen13 days1-2/+0
| | | | | | | | | | | | | | | | | | | | | | | As it stood, if you e.g did: control.background.shadow.visible: true control.hovered.background.shadow.visible: false Then the shadow would stay visible also when the control was hovered. The reason was because the shadow was already created in the normal state, and toggling visiblity after that point had no effect. This patch will fix this, so that we hide the shadow if its visibility is set to false after first having been created. We refrain from destroying it again, since doing so has a higher cost, and most likely, the hiding of the shadow is just temporarily. Task-number: QTBUG-130067 Pick-to: 6.11 Change-Id: Ib107b11b7f7fa638d7ac439348b9ccb75bf1bb1a Reviewed-by: Doris Verria <doris.verria@qt.io>
* gallery example: Give nameless controls an accessible nameOliver Eftevaag2025-12-098-0/+13
| | | | | | | | | | | The Accessibility Insights for Windows requires focusable controls to have a name. Ensure that those controls that don't get one by default, also have a name. Task-number: QTBUG-141669 Pick-to: 6.11 6.10 6.8 Change-Id: I6d19bffd24d7ac5b1b93fe4eaa003cefede09b13 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* StyleKit: don't bind to the palette from the Fallback styleRichard Moe Gustavsen2025-12-094-141/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to bind several of the colors in the Fallback style the palette. This turns out to be not such a good idea. The reason is that the palette differs across platforms, which means that a style created on e.g macOS can end up looking completly different when running on Ubuntu. While this might be wanted sometimes, more often it has the potential to come as a surprise at a late stage during development, and contributes to a "write once, debug everywhere" scenario. This patch will therefore change this. We now choose to follow the Basic style approach, and "hard-code" the colors in the Fallback style to be the same on all platforms. This gives developers a stable platform to build their own styles on top of. It's still fully possible to bind all colors in their own style to the palette, if they want a more dynamic style that respects the platform palette. Task-number: QTBUG-130067 Pick-to: 6.11 Change-Id: Ibeeedacb35b5a4c68c827b66baf0298a42b2948a Reviewed-by: Doris Verria <doris.verria@qt.io>
* StyleKit Example: improve the example after recent StyleKit fixesRichard Moe Gustavsen2025-12-063-13/+122
| | | | | Change-Id: I01bcdaea8a7014c3bd2f1c65b7d00a048700b91f Reviewed-by: Doris Verria <doris.verria@qt.io>
* StyleKit: respect theme paletteRichard Moe Gustavsen2025-12-051-2/+2
| | | | | | | | | | | | | | | | A Qt Quick Control will use StyleKitControl.text.color as its text color. But as it stood, it was not initialized to anything in the FallbackStyle. The result was that all controls got a black text color, regardless of what was set in the theme palette. It would also not respect any palette overrides done from the app. This patch will make sure that we, by default, bind text.color for the various control types to the matching color in the Qt Quick Control's palette. This color will, unless overriden by the app, be initialized to the color set by the theme. Change-Id: I6d4f67c81c57c9a30940a720816fa4ed2675b8bd Reviewed-by: Doris Verria <doris.verria@qt.io>
* StyleKit: Implement ScrollView, ScrollBar and ScrollIndicatorRichard Moe Gustavsen2025-12-041-0/+20
| | | | | | | | | | This patch will implement support for styling ScrollBar and ScrollIndicator. It also includes ScrollView, since otherwise, if we inherited the one from the Basic style, it would also use the ScrollBars from the Basic style. Change-Id: I8163824aec61ce3c84303b6add3fdb1b7701532e Reviewed-by: Doris Verria <doris.verria@qt.io>
* StyleKit: Add padding properties to textDoris Verria2025-12-041-2/+3
| | | | | Change-Id: I8a7fc86482e2083a24d1e7159737fd0ababc8e0b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* StyleKit: Add GroupBox controlDoris Verria2025-12-041-0/+7
| | | | | Change-Id: I0177d20c381d83d2a816199a89b6fc9150fa4766 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* StyleKit: Add Label controlDoris Verria2025-12-041-3/+2
| | | | | Change-Id: I3594798dfb475118cad046948ccc4fe180bbd9a3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQStyleKitFont: Drop extra "font" from property namesDoris Verria2025-12-041-2/+2
| | | | | | | | It's redundant as the class name is QQStyleKitPropertyFont. Also this makes it consistent with the palette API. Change-Id: Ic334c1febb1cdfb5cb09f898cb2f27ecb06c1c1f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Qt Quick Controls: add DoubleSpinBoxXavier BESSON2025-12-042-1/+16
| | | | | | | | [ChangeLog][Controls] Added DoubleSpinBox. Fixes: QTBUG-67349 Change-Id: Icb2f02162825daf74778de725f80af63874a5d16 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add font override properties to "text" propertyDoris Verria2025-12-011-0/+1
| | | | | | | | | This allows to override certain font properties per control/state. So then the final font propagation logic becomes: Fallback Style -> Style -> Theme -> Control -> State Change-Id: Ifb451b156b0e4de7734ac7b31a002cd3fcb78dd0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* StyleKit: Add style and theme fontsDoris Verria2025-12-011-0/+10
| | | | | | | | | | | | | | | | | Add a fonts property to the style that allows you to set fonts per control, similarily to what we do in QQuickTheme. The fonts are propagated from the style to the theme, and from the fallback style to the style. That means that if a font is not set for a theme or style, it will be resolved against its fallback font. Since both the QQStyleKitTheme and QQStyleKitStyle should have a fonts property, introduce a common base class: QQStyleKitThemeProperties that contains the fonts property. Later, the palettes can be moved there as well. Also add a font property to the QQStyleKitReader that is suposed to return the font for the current control being read. Change-Id: I116c1ab9bc426570756476ee409513587c475a0d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQStyleKitControl: add support for Instance VariationsRichard Moe Gustavsen2025-11-282-7/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will add support for Instance Variations. Instance Variations allows you to define one or more style variations in a StyleKit style that can be activated from the application using an attached 'StyleKitControl.variations' object. Instance Variations will affects all descendant StyleKitReaders of the item that contains the attached object. For example, if you set "StyleKitControl.variations: ['mini']" on a GroupBox, all controls inside that GroupBox will be affected with the variation named "mini" in the style (if any). Inside a variation, you specify which controls should receive alternative styling when the variation is applied. Any properties defined in a Variation override those set in the Style or Theme. In order to support Instance Variations, this patch will also refactor how we implement Type Variations, which are variations that applies to _all_ controls of a specific type, rather than to individual instances. Change-Id: I6486979281997e69b65da0ed4866b264c91c592f Reviewed-by: Doris Verria <doris.verria@qt.io>
* Examples: add new example: StyleKitExampleRichard Moe Gustavsen2025-11-2712-0/+2443
| | | | | | | | | | This patch will add a new example to Controls that demonstrates the new StyleKit API that has recently been added to Qt.labs. It contains a few styles that the user can choose between, where each style has a different level of complexity. Change-Id: Ie193105c05759eee2b4f4deb9d1932448d7e36c5 Reviewed-by: Doris Verria <doris.verria@qt.io>
* Doc: Add alternate text for Qt Quick and Qt Quick Controls imagesJerome Pasion2025-11-2612-21/+55
| | | | | | | | | | Alternate text (alt text) improves the documentation experience for screen readers and for other accessibility tools. Pick-to: 6.9 6.10 Task-number: QTBUG-135120 Change-Id: I975c3de11f893882fb9a27218079f244bd38a622 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Revise File System Explorer exampleAndreas Eliasson2025-10-291-45/+47
| | | | | | | | | | | | * Re-arrange and add section headers to adhere to the app template. * Replace first-person plural (we) with either third-person singular (the example) or second-person singular (you). * Add qdoc links to C++ or QML entities. Fixes: QTBUG-137898 Pick-to: 6.10 6.9 6.8 Change-Id: Ib61ca9beac1bafb4e4e5f8fcc6475093b313768e Reviewed-by: Jerome Pasion <jerome.pasion@qt.io>
* Examples: Stop using version numbers with QML modulesSze Howe Koh2025-10-283-3/+0
| | | | | | | | | | | | | | | | | | | | | Continues 2d44365f69b9bc946d085c6b149e2ac319700265 and b7f448f8647a9a118cee2d79d446194b20d4b335 * Qt 6.0 enabled and encouraged users to import QML modules without specifying a version number * Qt 6.5 enabled and encouraged users to create QML modules without specifying a version number With this approach, there is little benefit in specifying QT_QML_SOURCE_VERSIONS, especially in an example module that is not consumed by external software. It does not need to worry about compatibility/versioning. Task-number: QTBUG-89033 Task-number: QTBUG-140406 Change-Id: I7f83dc7430180b79b70c75e7ce7b3aef46a028ae Pick-to: 6.10 6.8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Flat Style example: Split CMake project into multiple QML modulesSze Howe Koh2025-10-174-20/+45
| | | | | | | | | | | | | | | | | | | Let the CMake structure reflect the existing module structure while making use of the auto-generated qmldir files. The qmake project and Qt Design Studio project are unaffected as they continue using the manually-written qmldir files. Drive-by edits: * Renamed the (unused) URI of top-level module to disambiguate it from the module that contains the actual styling code: "flatstyle" -> "FlatStyleApp" * Updated the docs to talk about QML modules instead of plugins Task-number: QTBUG-132922 Change-Id: I163a6c6a86a4eaf210a18433e6e5ea1f1fc67dd2 Pick-to: 6.10 6.8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Avoid showing content beneath status bars in wearable exampleAssam Boudjelthia2025-10-013-1/+6
| | | | | | | | | | | | | | | | | Instead of only moving the demo indicator and header slightly to the top when no page is selected or demo mode is inactive, hide them altogether so thay they don't end up showing under the system bars on Android. Also, for flickable pages clip their content so they don't end up scrolling to the top underneath the header and showing partially below the system bars. Pick-to: 6.10 Task-number: QTBUG-138022 Change-Id: I31da83ce5978dc1cab63cfe39d53f2d2c72088a9 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Gallery example: Brush up the .cpp fileFriedemann Kleint2025-09-111-24/+30
| | | | | | | | | Use modern string literals and replace #if-defery by a check on QOperatingSystemVersion::currentType(). Pick-to: 6.10 6.9 Change-Id: I319b6c7665a4c4cadd7d1e711d8527f79ca35261 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Spreadsheets example: Bump minimum required Qt versionSze Howe Koh2025-09-111-3/+3
| | | | | | | | | | | Amends 9601b74dabed53e93a7a5144d4c1fadb7876db18 The example no longer runs with Qt 6.9 or older as it uses the new (Horizontal|Vertical)HeaderViewDelegate types. Change-Id: I8430f4e9a48ddc9f72b20a4e998fde21480c4032 Pick-to: 6.10.0 6.10 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: Change the HTML to use unordered lists for linksOliver Eftevaag2025-09-031-11/+12
| | | | | | | | | | The text layout in this example has annoyed me for a while. I liked it better when each link was a list item, which used to be the case before a96871eac888e0c01b29d092bafa80755f1fb47a. Pick-to: 6.10 Change-Id: I68a6570dbc6c30e63b9d5b8b8079c9a58ab4e728 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* filesystemexplorer: Provide proper metadata for macOSKai Köhne2025-08-013-9/+20
| | | | | | | | | | | | While at it, also remove hardcoded application version in main.cpp: Qt can retrieve this from the application metdata. Also use camel-case for the project name, according to https://contribute.qt-project.org/quips/13 Pick-to: 6.10 Change-Id: If73fd741e330b66ae5367a61c65ccc65653cdab6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move SPDX header comment back to the top of the fileFabian Kosmale2025-07-211-1/+1
| | | | | | | | | Amends 728028280a6ed10191a14918b3b87acf8e2bd4d5 Pick-to: 6.10 Change-Id: Id65cca4a2189e798ae99c6997bdcbb0a6df2f786 Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* spreadsheets example: Configure qmllintFabian Kosmale2025-07-181-0/+2
| | | | | | | | | | | | The example is now warning free, so we can configure qmllint to fail if there is any additional warning. This is unfortunately not enforced in CI yet, as the all_qmllint target is (intentionally) not part of the all target; so we don't run qmllint in CI so far. Pick-to: 6.10 Change-Id: Ib179364ac5bda033ad6a2c3d87bc3738a98d1489 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* spreadsheets example: Fix warnings (and code)Fabian Kosmale2025-07-186-35/+38
| | | | | | | | | | | | | | - Use qualified lookups - Set the ComponentBehavior pragma where needed - There's no implicitRowWidth, use implicitRowHeight - Query styleHints from Application, where it has the correct type, instead of from the global Qt object, where it's only known as QObject (as it needs to provide something even when QtQuick is not available) - Remove unused import Pick-to: 6.10 Change-Id: Ia4ff94aa8f66754d0a374ade7ff6c8cad4329530 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* FileSystemExplorer: Add missing importFabian Kosmale2025-07-171-0/+1
| | | | | | | | | | | | | | When running on the example, qmllint would complain that it doesn't know about Qt.RightEdge (and BottomEdge). The reason for that is that the global Qt namespace is only exposed by the global Qt object from builtins. Controls doesn't actually expose that one, so we need to import QtQml (QML would work, too, but that's mostly internal). Pick-to: 6.10 Fixes: QTBUG-138171 Change-Id: I28004e1d36ae6d07a1a01a72ecf716b17ca5b9ec Reviewed-by: Dennis Oberst <dennis.oberst@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* Gallery example: Add missing controlsMohammadHossein Qanbari2025-06-2410-4/+549
| | | | | | | | | | | The previous gallery example was missing several controls, which limited its usefulness for demonstration and testing purposes. This patch adds the missing controls, ensuring the example now provides a comprehensive overview. Pick-to: 6.10 Change-Id: I79115bfffd581ca20af1c2a206a145c5362311bb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Gallery example: Add disable optionMohammadHossein Qanbari2025-06-2025-20/+56
| | | | | | | | | A "disable" option has been introduced. This allows users to view the disabled state of all controls. Pick-to: 6.10 Change-Id: If2fa5b673ac9db7acf805203046d111dda13f435 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update SortFilterProxyModel in Gallery exampleDilek Akcay2025-06-173-19/+16
| | | | | | | | | | | SortFilterProxyModel has been replaced with the new version as the updated SFPM includes QML support which was not available in the previous version. Pick-to: 6.10 Change-Id: I9e48b96810f6f2d6f0f1557f7003b7fb274d39ca Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Pierre-Yves Siret <gr3cko@gmail.com>
* Introduce SearchField for Quick ControlsDilek Akcay2025-06-015-0/+64
| | | | | | | | | Add a new QQuickSearchField as part of the Qt Quick Controls to simplify implementing search functionality for lists of items. Task-number: QTBUG-126188 Change-Id: I634131161447616a2d66e7f301bd8a24adac2d7f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* attachedstyleproperties: Add safe area padding to custom ToolBarTor Arne Vestbø2025-05-311-0/+5
| | | | | Change-Id: I15adb570c3d04535712bbffdee5b2237a4809365 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* spreadsheets: Make HeaderToolBar a regular ToolBarTor Arne Vestbø2025-05-311-54/+47
| | | | | | | | | Which gives us safe area padding automatically. Change-Id: Id8c68f857813740d1b22a19cfe4d1a86520310aa Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* EventCalendar example: reference the listview explicitly in the delegateVolker Hilsheimer2025-05-241-1/+2
| | | | | | | | | | The example generates warnings on stderr when shutting down, presumably because (some) delegate items no longer have a parent. Instead of referencing parent, give the ListView an ID and reference it explicitly. Pick-to: 6.9 6.8 Change-Id: If968e9f95e31226e9c3fb2f63eb92cff5afd3cba Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* EventCalendar example: balance begin/endResetModel callsVolker Hilsheimer2025-05-241-3/+3
| | | | | | | | | | | The repopulate() implementation has an early return. Use a scope guard to make sure that we always balance being and end calls. Pick-to: 6.9 6.8 Fixes: QTBUG-136947 Change-Id: I8d817ad7bdcae8645afe15479a510c6fd070c88b Reviewed-by: Dilek Akcay <dilek.akcay@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* TextEditor example: allow setting multiple font attributesShawn Rutledge2025-04-291-4/+4
| | | | | | | | | | | | | | | | | | | | When a user activates the boldAction for example, the code was replacing QTextCharFormat's font with a default-constructed font that has the bold attribute set, which meant that it could not be bold, italic, underlined struck out, and with a custom size and color at the same time. On the other hand, when we do it the current way: textArea.cursorSelection.font.bold = checked we call QQuickTextSelection::font(), QFont::setBold(), and then QQuickTextSelection::setFont(). (QFont is a QML value type, so it's the only way.) Perhaps at some point, something was going wrong with that, but it seems to work now. Amends 045f9ce192d841f3cc36d514b5f238b46488b41e Fixes: QTBUG-136250 Pick-to: 6.8 6.9 Change-Id: I268e5814e7aa52aeb5aaec2d1a8fbfbc0d670236 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Remove menu shortcut from Controls gallery exampleShawn Rutledge2025-04-291-5/+0
| | | | | | | | | | | | Text editing controls TextField and TextEdit provide their own context menus since 3b598b6f7509f57e198e7de1f04e4333555e7227. We don't want a global menu key shortcut to preempt those. Task-number: QTBUG-136253 Pick-to: 6.9 Change-Id: I7d0ec3754e24154b203c8ccd95801542a185a1c4 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* TextEditor example: Add font and color dialog actions to Format menuShawn Rutledge2025-04-281-0/+6
| | | | | | | Task-number: QTBUG-136251 Pick-to: 6.8 6.9 Change-Id: I64d7a406d4acff5395cfc18c201888c17a44e10f Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Improve QML in Controls TextEditor exampleShawn Rutledge2025-04-281-11/+2
| | | | | | | Pick-to: 6.8 6.9 Task-number: QTBUG-119988 Change-Id: Iffc7df85f25024301efef591eb3fbfb1cfbe2f17 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* TextEditor example: add actions to built-in context menu, remove custom menuShawn Rutledge2025-04-082-55/+35
| | | | | | | | | | | Since 3b598b6f7509f57e198e7de1f04e4333555e7227 TextArea comes with a built-in context menu. Here we demonstrate how to add extra menu items to the end. Pick-to: 6.9 Task-number: QTBUG-35598 Task-number: QTBUG-134903 Change-Id: I1e3d8c044939521aaa076486630e3b879130dfd1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Basic Style: Add support for dark mode color schemeMohammadHossein Qanbari2025-04-051-1/+1
| | | | | | | | | | | | | | | | | | | Previously, the basic style did not respect the system's dark mode settings because the palette initialized by QQuickBasicTheme lacked definitions for dark mode colors. This commit updates the palette initialization to dynamically set colors based on the current system color scheme. Additionally, the palette is reinitialized whenever the system color scheme changes. The controls gallery example has been updated to demonstrate the new functionality. [ChangeLog][Controls][Basic] Basic style supports dark mode now. Fixes: QTBUG-135207 Change-Id: I2d6a74b407a7981905a9b86e97004cf0609a4bf0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Gallery Example: Fix Shortcut.sequence warningMohammadHossein Qanbari2025-04-031-1/+1
| | | | | | | | Since StandardKey.HelpContents has two key bindings (at least on ubuntu) then setting `sequences` removes the warning. Change-Id: If4fb733fe562f1fc56af0d53ae029fa3bd32c0e0 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* QuickControls: Add vertical and horizontal header view delegatesMohammadHossein Qanbari2025-03-062-62/+49
| | | | | | | | | | | | | | | | | | | | | | Implement QQuickHeaderViewDelegate as the base class for header view delegates, introducing 'headerView' and 'orientation' properties. Separate previous delegate settings into HorizontalHeaderViewDelegate and VerticalHeaderViewDelegate components for Basic, Fusion, and Imagine styles. This change improves the modularity and reusability of header view delegates across different styles. It also allows for more consistent behavior and easier customization of header views. A test suite has been added to verify default property settings and ensure the new components work without warnings. [ChangeLog][QtQuickControls][HeaderView] Add dedicated delegate components for vertical and horizontal header views. Task-number: QTBUG-70326 Change-Id: I8831e77f6909bdae13c3a7262145ab156f63a59a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Limit page stacking to only one pageMorteza Jamshidi2025-02-031-0/+3
| | | | | | | | | By limiting the page stacking there is no need for handling multi-page navigation. Fixes: QTBUG-132715 Change-Id: Ibbd99834d2740653340fd785f94c19215eab2e7d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Spreadsheets: Fix drag and drop issue after scrolling in table viewMohammadHossein Qanbari2025-01-281-94/+102
| | | | | | | | | | | | | | | | | | This patch fixes an issue with drag and drop functionality in the example, particularly after long scrolling. The problem stemmed from two main factors: - The table view was stealing DropArea events when interactive. - The drop area was positioned behind the table view's contentItem, preventing it from receiving the events. The drop area is now positioned above the table view, ensuring it can receive events during dragging operations. The table view's interactive mode is temporarily disabled when dragging begins and restored to its previous state when dragging ends. Task-number: QTBUG-125767 Change-Id: I8920284f4652464bccd92109a2a9685228e11783 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Spreadsheets: Prevent data loss when dropping cells in invalid locationsMohammadHossein Qanbari2025-01-241-0/+23
| | | | | | | | | | | | | | | | | Before this patch, dropping selected cells into an invalid place in the TableView could result in partial data loss. This occurred because some of the selected data couldn't be set to the new cells, and the data was copied at the start of the drag operation. This patch improves the drag-and-drop functionality by: - Checking the possibility of copying selected data to target cells before the drop occurs (and during dragging). - Avoiding highlighting of invalid target cells during the drag operation. Task-number: QTBUG-125767 Change-Id: Iff1058c2239f4bad3430f4f01ccea619f1ac8773 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>