aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
Commit message (Collapse)AuthorAgeFilesLines
* Docs: fix various linksVolker Hilsheimer39 hours1-2/+2
| | | | | | | | | Use the correct syntax for the scope of the link target for Qt Quick types. Pick-to: 6.11 Change-Id: Ica96c1b736a9b8ddd29a63c21d6a7094bd598ed8 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* TableView: fix initial topRow/bottomRow/leftColumn/rightColumn signalsMiika Pernu43 hours1-1/+1
| | | | | | | | | | Property changed signals weren't correctly emitted due to comparison against old values that were incorrect. When constructing the view for the first time, the properties have initial value of -1 and not 0. Fixes: QTBUG-142067 Change-Id: I86bde8abd65e6f135a9f03f35913da914d762d26 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Allow GraphicsInfo to be used with a WindowLaszlo Agocs5 days2-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | Allow writing Window { property int api: GraphicsInfo.api } instead of having to do Window { property alias api: dummy.api Item { id: dummy property int api: GraphicsInfo.api } } Change to member initialization to avoid duplicating many lines with the existing constructor. Pick-to: 6.11 Change-Id: Ie07247ee8a6ae1b2d3d7245d77e83ece89909729 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Neutralize Qt Quick index pageAndreas Eliasson6 days1-3/+3
| | | | | | | | | Be more explicit about how to use the module in a C++ project. This way, we can add future supported language sections later. Fixes: QTBUG-142009 Change-Id: Iaa300155b0079df6b4fbbd6bfc8e05da94634af8 Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>
* Avoid the Shapes gradient texture cache growing without boundsEirik Aavitsland6 days2-32/+74
| | | | | | | | | | | | | | | | | | | | | | | | Nothing was ever removed from the cache, so in case of e.g. an animated gradient, a large number of texture objects would be created and not released, and memory would quickly fill up. Fix by changing the caching implementation with a set maximum number of cached gradient textures. This introduces a soft limit on the supported number of simultaneously displayed different gradients in the application. If exceeded, some objects will show wrong gradient colors. Although unlikely to be reached, the limit is documented and configurable by environment variable. As a driveby, improve the gradient cache key qHash() implementation a bit, presumably giving better spread for the QCache. Fixes: QTBUG-142208 Fixes: QTBUG-136553 Pick-to: 6.11 6.10 6.8 6.5 Change-Id: Ie104f27031572e1c392c0a8ef79d09f4a2ba5a8e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Avoid create offscreen surface when using custom rhi deviceJiDe Zhang8 days1-1/+10
| | | | | | | | | | | | | | | | | | | | | | | When QQuickRenderControl is used for multi-threaded rendering with a GLES backend, a warning "Attempting to create QWindow-based QOffscreenSurface outside the gui thread. Expect failures." may be emitted. This warning occurs when an QOffscreenSurface is created even though the QQuickWindow already has a custom RHI (Rendering Hardware Interface) graphics device explicitly configured. Creating an additional offscreen surface in this specific context is redundant and can lead to the aforementioned warning, especially given the multi-threaded nature. This change introduces a check to detect if the QQuickWindow is already utilizing a custom RHI graphics device. If a custom RHI device is present, the creation of the general QOffscreenSurface is skipped. This prevents the warning and potential resource conflicts, ensuring QQuickRenderControl operates correctly when an RHI-specific graphics device is already in use, without unnecessary surface allocations. Pick-to: 6.11 Change-Id: I343dff445ad320ab120c71764d756126bf0ce133 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix documentation syntaxNicolas Fella8 days1-2/+2
| | | | | | Pick-to: 6.11 6.10 6.9 Change-Id: I3da95e29f642224067307a64450b80154c10cb82 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Neutralize 'Best Practices for QML and Qt Quick' pageAndreas Eliasson9 days1-15/+15
| | | | | | | | | | | | | | | | Re-write in such a way that there's room for other backend languages to be included on the page. * Re-write introductory section about separating UI logic from business logic, replacing C++ references with the more general "strongly typed language". * Keep section "Exposing Data from C++ to QML" as it's still valuable. Fixes: QTBUG-142007 Pick-to: 6.10 Change-Id: Icb94d354ad3b2bf913c202e74174aee7c31036b4 Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>
* Add notes to Animator docsLaszlo Agocs12 days2-2/+21
| | | | | Change-Id: I2a985ab1900afb8c027405fb0ec76c250c7535e0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Replace QSequentialIterable with QMetaSequence::IterableUlf Hermann12 days1-1/+1
| | | | | | | | QSequentialIterable is deprecated. Task-number: QTBUG-140181 Change-Id: I797c18fa5c319e5c1a0114448d98a38aad33ae04 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* QAccessibleQuickItem: support readonly stateOliver Eftevaag13 days1-0/+2
| | | | | | | | | | | | | | | | | | Accessibility Insights for Windows complained that the ProgressBar didn't communicate that it's readOnly. The reason, is because ProgressBar supports the ValueInterface, which according to https://www.access-board.gov/ict/#502-interoperability-assistive-technology must report its minimum value, maximum value, and readOnly state. In general, it looks like QAccessibleQuickItem never acknowledged that anything could be readOnly. Pick-to: 6.10 6.8 Change-Id: I96cc0d815e00981d320b50f4309fad6bb5ab0118 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Private API for giving an Item its own OverlayPaul Olav Tvete2025-11-282-1/+15
| | | | | | | | | | | | | | | | | | | There are cases, such as Item2D in QtQuick3D, where a Qt Quick user interface is not placed directly inside a QWindow. In that case, Menu and other Popup items need to be shown in the context of the toplevel Item rather than the window. There are two separate Popup implementations: A popup can either be a toplevel window known to the windowing system, or it can be an Item that lives in a special Overlay layer, which normally fills the entire window. This change adds private C++ API in QQuickItemPrivate to add a custom Overlay to an Item. This does not in any way affect the case where a popup has its own toplevel window. Task-number: QTBUG-142145 Change-Id: Ic96a450f6d47e43d1ffc8226b27c1dc5d62e3497 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Flickable: add positionViewAtChild, flickToChild, flickTo(position)Xavier BESSON2025-11-265-14/+314
| | | | | | Fixes: QTBUG-141747 Change-Id: Icc194fb35da84f580b3bdfcb64944f5834b766dc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Stop flooding the log with animation timer typeJoni Poikelin2025-11-261-1/+1
| | | | | | | | | | This variable used to be static and the logic still looks like it expects it to be so. Static was probably removed in an error. This causes unnecessary environment variable reading and logs being printed as this function is being called for every frame. Change-Id: Id24d9cfecb0f509f92cef47f6a95800ff529259b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* qml generator: add functionality for animated (morphing) pathsEirik Aavitsland2025-11-261-1/+1
| | | | | | | | | | | | | | | | | Add a new Path item to the Helpers module: pathInterpolated, that holds a list of paths (specified as svg path texts) and has a settable interpolation factor property. Based on the value factor, the resulting path will be an interpolation between path #n and path#n+1, where n is the integer part of the factor. The fractional part determines the interpolation weight between the two. Replace the static QPainterPath in PathNodeInfo with an animated property holding QPainterPath values. During generation, if the property is found to be animated, a PathInterpolated item is generated instead of a static PathSvg item. Change-Id: Ic061005e135cbde1bd88ab1ac7c9e7840f55c232 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Doc: Add newly published Academy Course for Qt Quick and modify the course ↵Inkamari Harjula2025-11-261-1/+9
| | | | | | | | | | | listing Course link added and list modified. Task-number: QTBUG-142148 Pick-to: 6.10 Change-Id: I8a11394b110a80bb9625d88222b0c5a3a3e6aed4 Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>
* doc: Document caveats of setting user input on Text componentEskil Abrahamsen Blomfeldt2025-11-211-2/+16
| | | | | | | | | | | | | | | | | | | | The HTML subset in Qt was never intended to be end user facing and is very specifically modelled to Qt's needs. Without precaution, an application can easily end up setting a user provided string as content on the Text component. This can cause both unexpected results for the end users (if they expect a compliant HTML engine) and arbitrary image loading/allocation. Since the default text format of Text is AutoText, we make sure to document that user provided data should not be set directly as content on the label unless the PlainText format is explicitly selected. Pick-to: 6.5 6.8 6.10 Change-Id: I4383389640ff140da1ccbdf58e198e2868ad9774 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Window: specify correct property typeFabian Kosmale2025-11-204-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | Given that the property was documented to only take a screen from Application's screen list, we can arguably do this change, especially that any usage with a non-QQuickScreenInfo would just end up setting a null-pointer, indicating some bug. Any code reading the property is fine anyway, as a QQuickScreenInfo is still a QObject. This also uncovers that the screengrabber base line test did not handle this correctly (it passed a QScreen to setScreen, which doesn't work). This would now fail to compile. Fix it by passing the actually expected object along. Amends d6dfbe8fd5d09388fc624d85c4aefa0269c20db9 [ChangeLog][Important Behavior Change][QtQuick][Window] Window and ApplicationWindow now enforce that the type of the property passed to the screen property is ScreenInfo. It used to accept any QObject, but would silently convert it to null if the type was not correct. Change-Id: I512c24c761ef5e6e9b7f241d222c98a34c6fafa4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix QQuickItemPrivate::eventHandlingBounds()Shawn Rutledge2025-11-191-1/+1
| | | | | | | | | | The second two arguments are width and height, not bottom-right coordinates. So after shifting the rectangle left and upwards, we need to add twice the margin to width and height, to have the same margin all the way around. Amends 8115731466b579f33295d5c8a71506475750284e Change-Id: I83797ffd460ee47599170090aefcda544c3e4483 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Overhaul the Positioning with Anchors topicAlexei Cazacov2025-11-191-8/+34
| | | | | | | | | | | This commit slightly improves the topic. Now, the snippets on this page not only display "bad code" but do show how to do things properly. The formatting was also improved a bit. Task-number: QTBUG-141543 Pick-to: 6.10 Change-Id: Idc7a2bd8a4a86c96d9490c43d1b3dcf725b5581f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* quick/items: fix build when qreal is floatNick Shaforostov2025-11-172-4/+4
| | | | | | Pick-to: 6.10 6.8 Change-Id: Idc096a96c3c6895b09a97b6ef2d644d8b0454b60 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Add effectivelyClipsEventHandlingChildren; skip event delivery when irrelevantShawn Rutledge2025-11-177-25/+206
| | | | | | | | | | | | | | | If a QEventPoint is clearly outside an item _and_ the bounds of all its children, or is simply outside the bounds of an item that clips its children, we can stop recursion, for purposes of QPointerEvent delivery, finding which items/handlers are hovered, or which could control the cursor shape. effectivelyClipsEventHandlingChildren() is also recursive, but at least the result gets cached. Task-number: QTBUG-140340 Task-number: QTBUG-115179 Change-Id: I085e38964de6993fa82ad3bd1256868125fde090 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Make images readable in a dark theme in Positioning and AnchoringAlexei Cazacov2025-11-178-0/+0
| | | | | | | Task-number: QTBUG-141543 Pick-to: 6.10 Change-Id: I72690a203d429a033160cc52c40c815de22356a9 Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
* tableview: fix build with -no-feature-cursorNick Shaforostov2025-11-131-1/+3
| | | | | | | Pick-to: 6.10 Change-Id: I2667210311de7ee41db1d90fff71d4d4bb388ee2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* QQuickText: re-layout eliding text that grows in widthOliver Eftevaag2025-11-121-2/+2
| | | | | | | | | | | | | | | | | | | | | Laying out text is somewhat expensive, which is why the geometryChange function tries to determine whether or not it's necessary. However, when growing the width of multi-line eliding text, we would over-optimize, and stop relayouting, when there would have been more space for text. This worked for single line text, since then the widthExceeded flag would always be set to true, when the natural text width exceeds the layouts width. However, we don't always set that flag for multi-line text, thus it's possible that we skip the relayout step every time we increase the width of the Item. Fixes: QTBUG-140875 Pick-to: 6.10 6.8 Change-Id: I1f7758bed2c52044d0179a83d4bf4a774f22e4e3 Reviewed-by: Bror Wetlesen Vedeld <bror.vedeld@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* QSGThreadedRenderLoop: Drop dead codeKonstantin Ritt2025-11-121-17/+1
| | | | | | | syncResultedInChanges is not used since 27d674e9ec2 (v6.0.0-alpha1). Change-Id: I13e413dd47b391c279d6fc8a15d23d728fef1e58 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Reduce QTransform use in event delivery and cursor-finding functionsShawn Rutledge2025-11-116-60/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass localPos to deliverHoverEventRecursive, deliverHoverEventToItem and sendHoverEvent, so that deliverHoverEventRecursive() can merely transform from its own coordinate space to each child's space by calling itemToParentTransform(). That doesn't require up-the-tree recursion like mapFromScene() does. Apply the same trick to QQuickWindowPrivate::findCursorItemAndHandler(). Apply the same trick to QQuickPointerHandler::parentContains(local, scene): now QQuickPointerHandler::parentContains(QEventPoint) also calls that with both local and scene positions, which it already has, so this likely optimizes some use cases outside of the hover and cursor cases. But to make that work, we need to apply the same trick to QQuickDeliveryAgentPrivate::eventTargets() as well, and now it needs to localize the QEventPoint before calling the predicate. Usually, global position is QGuiApplicationPrivate::lastCursorPosition; but when no mouse events occur, only touch events, lastCursorPosition may remain offscreen. So we use the QEventPoint::globalPosition when possible; so it's useful to pass globalPos along to each of these hover functions, so that deliverHoverEventToItem() can construct the QMouseEvent with it, and sendHoverEvent() can construct the QHoverEvent with it. Also amends f5140d62082e9b06e0ca6c8e2175b5836286f52e: that looked rather CPU-intensive to call several mapping functions. The test is retained. Task-number: QTBUG-134099 Task-number: QTBUG-140340 Change-Id: I2c520d430e58ec7c00ada2207541b2936c7ae596 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Mark internal APIs with \internal commandJerome Pasion2025-11-078-2/+53
| | | | | | | | | | | These internal APIs have function documentation but are missing class documentation. Adding an internal class documentation fixes QDoc warnings. Task-number: QTBUG-141697 Change-Id: Iecb289d39e34ddaa964fbe0a1404830cd2269caa Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Use explicit links instead of auto-linkingDavid Boddie2025-11-071-7/+7
| | | | | | | | | This ensures that QDoc will always link to the QML types page and not to the corresponding C++ classes overview. Change-Id: I60cd6475ecf87190101507e8508e5c9403a2ed90 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Add documentation dependencies to make all QML types availableDavid Boddie2025-11-071-1/+3
| | | | | | | | | | To be able to list all QML types that inherit from Item, the Qt Quick documentation needs to depend on the modules that rely on Item and other QML types. Task-number: QTBUG-130152 Change-Id: I15bd63a4cffa1f1852b78bdd23b1f06c66ef468b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: delegateModelAccess was added in Qt 6.10Kai Uwe Broulik2025-11-064-0/+4
| | | | | | Pick-to: 6.10 Change-Id: I795c2a35e2fec71d8dbe481ff334b9bcfdf6692a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add dev-only static item statistics in QQuickItemPrivateJan Arve Sæther2025-11-063-0/+32
| | | | | | | | | | | | | | Statistics are useful for profiling. - count of total items ever created, obviously has many uses - how many of those also have ItemExtra? - how many times did we call the QTransform-construction functions during the course of event delivery and for other reasons? (This is one of the most expensive runtime costs at present.) Task-number: QTBUG-140340 Change-Id: Id7443f0dcf9e038f446304f371e29bfa612fcad2 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Expose window devicePixelRatio as a propertyMarco Martin2025-11-052-0/+23
| | | | | | | | | | | | | | | | | | On some platforms only the window knows the correct devicePixelRatio which is different than the one on QScreen. On QWindow changes to devicePixelRatio are exposed through an event so we make forward the event to a signal here. We hook it to QQuickWindow's effectiveDevicePixelRatio because it takes into account QQuickRenderControl::renderWindowFor() and QQuickRenderTarget::devicePixelRatio() Effective device pixel ratio is returned as it is the one that matters for rendering or calculations for sizes. QQuickWidget forwards the events to the QQuickWindow already. Fixes: QTBUG-141448 Change-Id: I2908b52dbcf005ec25ba282c92906eb6172c9d19 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Docs: Fix a tag errorElias Toivola2025-11-051-1/+1
| | | | | | | Pick-to: 6.10 6.8 Task-number: QTBUG-140073 Change-Id: I54f1c2a09455bd9b232ff332b0725bb1c8c791c0 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Remove QmlMeta and QmlModules as PUBLIC_LIBRARIES dependenciesTor Arne Vestbø2025-11-041-2/+0
| | | | | | | | | | | | They are implementation details. Adding them as PUBLIC_LIBRARIES will include them in the QtQuickDepends header, but there are no public C++ APIs in these modules. Pick-to: 6.10 Change-Id: Ib6d65ea54ed391b3487d8e0bf808dc02e0e0f93c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* a11y: Use existing helpers to implement cursor-based text methodsMichael Weghorn2025-11-011-27/+4
| | | | | | | | | | | | | | | | | | New QtGuiPrivate helper methods qt_accTextBeforeOffsetHelper, qt_accTextAfterOffsetHelper and qt_accTextAtOffsetHelper were recently introduced in qtbase as QtGuiPrivate helper functions in order to deduplicate the logic implemented in both, QAccessibleTextWidget (in qtbase) and QAccessibleQuickItem, and then fix existing issues in one place. Switch the QAccessibleQuickItem implementations to use these helpers, which fixes the issue described in more detail for the QTextEdit in QTBUG-140504 also for the QML TextEdit. Task-number: QTBUG-140504 Task-number: QTBUG-139943 Change-Id: Ia50213d114ca415c24837e0212619a369d31bc3c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Increase robustness of <img> tag in Text componentEskil Abrahamsen Blomfeldt2025-10-312-4/+19
| | | | | | | | | | | | | | | | | | | | For Text.StyledText, there was no protection against <img> tags with very large widths or heights. This could cause an application to spend a very long time processing a layout and sometimes crash if the size was too large. We reuse the internal coord limit in QPainter as our maximum size here, similar to what we do in Qt Svg for instance. For Text.RichText, there were no issues in release builds, but in debug builds, you could trigger an overflow assert when rounding the number if it exceeded INT_MAX. For this, we simply cap the width and height at INT_MAX. Fixes: QTBUG-141515 Pick-to: 5.15 6.5 6.8 6.10 Change-Id: I4bcba16158f5f495a0de38963316effc4c46aae1 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Rich text: Limit size of text objectEskil Abrahamsen Blomfeldt2025-10-311-6/+10
| | | | | | | | | | | | | | When we draw a text object, we need to store this in RAM since the QTextObjectInterface is QPainter-based. This could lead to over-allocation if the text object size was set to be very large. We use the existing image IO infrastructure for making sure allocations are within reasonable (and configurable) limits. Pick-to: 5.15 6.5 6.8 6.10 Task-number: QTBUG-141515 Change-Id: Ieae06a9e92a7bd078d22ab2314889201c2049122 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove qml-i18n example in qtdeclarative repoAlexandru Croitor2025-10-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The qml-i18n example and the qtdeclarative repo itself depend on the LinguistTools CMake package, which is not available while building qtdeclarative. This results in: - missing build coverage for the example - a cyclic dependency, because qtdeclarative depends on qttools (because of LinguistTools), and qttools depends on qtdeclarative (because of qdoc needs) - we try to find a module that will never be available, unless qtdeclarative is built together with qttools in a top-level build - in certain cases, if the top-level build fails early enough, the cyclic dependency causes reconfigurations to fail Remove the example, the lookup of LinguistTools, and the linguist doc references to avoid all these issues. Replace the qt_add_translations reference in the docs of the QQmlApplicationEngine class with a snippet copy. Pick-to: 6.8 6.10 Task-number: QTBUG-141465 Change-Id: Id88603a3753f53dfac9f350e981073effda15eb1 Reviewed-by: Masoud Jami <masoud.jami@qt.io>
* QQuickTextInput a11y: Allow modifying text selection via a11y APIMichael Weghorn2025-10-304-0/+78
| | | | | | | | | | | | | | | | | | | Similar to the previous commit that introduced QAccessibleQuickTextEdit, introduce QAccessibleQuickTextInput and implement the logic to modify selection. This allows changing the selection for QQuickTextInput and its QQuickTextField subclass via the platform accessibility API, e.g. the AT-SPI Text interface's SetSelection method. Extend the existing TextInput autotest accordingly. Task-number: QTBUG-139943 Task-number: QTBUG-140441 Change-Id: Ie05c6b0cf3431aabb4b337dbfa07c40c56660e2b Reviewed-by: Timon Sassor <timon.sassor@governikus.de> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* a11y: Make QQuickTextInput accessibleMichael Weghorn2025-10-302-0/+82
| | | | | | | | | | | | | | | | | | So far, accessibility logic was implemented in QQuickTextField, while its base class QQuickTextInput didn't have any implementation. Most of the existing logic only requires QQuickTextInput(Private), however. Move that logic to the QQuickTextInput(Private) base class and only leave the QQuickTextField-specific logic in the subclass. Task-number: QTBUG-139943 Fixes: QTBUG-140441 Change-Id: I757222a7b6c21b575bfe404333cc7ed91af86ed7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QQuickTextEdit a11y: Allow modifying text selection via a11y APIMichael Weghorn2025-10-305-4/+82
| | | | | | | | | | | | | | | | | | | | | | | | | Introduce new QAccessibleQuickTextEdit as a11y implementation for QQuickTextEdit. Subclass the existing QAccessibleQuickItem and override the methods to modify text selection. (For retrieving the existing selection, the logic in the base class is fine, but the TextEdit properties selectionStart and selectionEnd are read-only, so cannot be set directly there.) Implement the QAccessibleTextInterface::addSelection logic in the base class, so it can also be reused by the QAccessibleQuickTextInput class that will be added in an upcoming commit to implement similar logic for QQuickTextInput and QQuickTextField. Extend the existing unit test to also test text selection. Task-number: QTBUG-139943 Pick-to: 6.10 6.9 6.8 Change-Id: Ibd6aa3e1bc9a24352c9bef4fcf4a452252d6689c Reviewed-by: Timon Sassor <timon.sassor@governikus.de> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Reorder QQuickRotationPrivate members by typeJiDe Zhang2025-10-301-2/+2
| | | | | Change-Id: Ic4def3b9649cf369be97b18cf7916ddef4ee5ade Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add distanceToPlane property for QQuickRotationJiDe Zhang2025-10-302-2/+47
| | | | | | | | Followup to a6b55b3c46cf47d560e10a4b69db24a475261546 Change-Id: If35cb2b3ab5654549e76fc18ad094acdc7a832eb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Doc: Fix qml lint binding warningsAndreas Eliasson2025-10-291-5/+5
| | | | | | | | | These snippets show up in the Qt Quick States documentation. Fixes: QTBUG-140487 Pick-to: 6.10 Change-Id: I897865e16a356c1c561715adc4daa97a4bd3dd67 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Fix swapped parameters in QDoc link commandsDavid Boddie2025-10-272-2/+2
| | | | | | | | These links coincidentally happened to go to sections with the target name but I assume that the aim was to link to the scene graph overview. Change-Id: I77662158a2f7f8cb679a8585b6c15c61689a3c58 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Consider new Switch role introduced in qtbaseLars Schmertmann2025-10-272-6/+12
| | | | | | Task-number: QTBUG-139676 Change-Id: Iea39ae7c18e71956e7a101a86425c84d876e8730 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
* Software Renderer: Fix artifacts with non pixel aligned contentAndy Nichols2025-10-271-0/+5
| | | | | | | | | | | | | It was possible that we would request to flush more of the backing store than what was actually painted, which could lead to artifacts. Now when there is a difference caused by the pixel alighment conversions, we make sure to mark items behind that content as dirty so that everything necessary to render correctly is painted. Fixes: QTBUG-133368 Pick-to: 6.10 6.8 Change-Id: I9766017eb610792ffa17b745c356b614e4e28752 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Allow text edit to process key events when shortcutoverride configuredSanthosh Kumar2025-10-271-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The shortcut override has been made to be ignored by default as part of the patch 1aefea26e5a574dad25646d330a6b3bb943a596c. And the further changes in the same patch were made to check whether the shortcut override can be accepted by text edit before processing the events. If the shortcut override has not been accepted (either by default or explicitly ignored by the user), the keys would be processed further by the textedit. The validation added as part of the same patch for processing the event doesn't seem to be correct, as it allows the key to be processed by the text edit control only when the key handler is not configured. This approach seems to be incorrect, as the text edit control shall be allowed to process the key events regardless of key handler configuration. This patch removes that validation, thus allowing the text edit control to process the key events regardless of key handler configuration. Fixes: QTBUG-139679 Task-number: QTBUG-136959 Pick-to: 6.10 6.8 6.5 Change-Id: I7c066e5f3709a00d0b18f0c5e8b9d1f7944c4e4e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* doc: Fix mention of DragHandler in TapHandler docsShawn Rutledge2025-10-241-1/+1
| | | | | | | | Amends 6eaa95662c2d4ba287ac5d1de5ec49bd3a9f59e6 Pick-to: 6.5 6.8 6.10 Change-Id: I195e26fa1a703607b1d65d57e5dc43a072b05e72 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>