summaryrefslogtreecommitdiff
path: root/src/quick/items
Commit message (Collapse)AuthorAgeFilesLines
* doc: Use part of window example for Window.flags property snippetShawn Rutledge2023-05-161-1/+3
| | | | | | Pick-to: 6.2 6.5 Change-Id: I5b5c1663f626ce3bfe4c01edbc5480729a1b91f6 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* doc: Make Window snippets testable; remove import versionsShawn Rutledge2023-05-171-19/+3
| | | | | | Pick-to: 6.2 6.5 Change-Id: I35ba013152628591d016c632828a1c4e64cf5978 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* doc: Clarify usage of palette; testable snippetsShawn Rutledge2023-05-172-15/+15
| | | | | | | | | | | | | | | | | - color groups are better shown with copyable monospace syntax rather than capitalized - clarify that using palette grouped-property syntax does not imply that you must define every color - Window has a palette property, inited from SystemPalette: it's not only ApplicationWindow - testable snippets - reuse part of the windowPalette snippet for the Window.active property (switching colors might be the main use case) - make more links Pick-to: 6.2 6.5 Change-Id: I5974351ba66fc9aeec34cb6a4aba1eb85289f536 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Enhance Image docs about compressed formatsLaszlo Agocs2023-05-161-0/+37
| | | | | | | | Pick-to: 6.5 6.2 Fixes: QTBUG-113565 Change-Id: I6ccd0aa27a599c09a93a6c377b36697d9c60f25e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Doc: Fix linking and read-only status for Window.visibility propertiesTopi Reinio2023-05-161-1/+3
| | | | | | | | | | | | | | | QDoc has problems linking to a topic that has identical name to the topic the link appears in, as is the case when linking from 'visibility' property to 'visibility' attached property. Add a unique \keyword for the former and use it for linking. Explicitly set the attached property as \readonly. Pick-to: 6.5 6.2 Task-number: QTBUG-113015 Change-Id: Ia0eb99fd2436565c697ca23629134b691acecc1b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickWindow: Add missing break statements in event()Vlad Zahorodnii2023-05-151-0/+2
| | | | | | | | | Amends commit 1314592f41abecb6f1140d3bfe39bba8a2c4ea7e. This fixes a -Wimplicit-fallthrough compiler warning. Change-Id: I29285df5e1b2b19590dd5bcd0c50b942b668c807 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickText: Mark as a dirty node when its ClipRect changesPiotr Wierciński2023-05-122-12/+21
| | | | | | | | | | | Make sure that any changes to ClipRect of QQuickText are properly propagated. Fixes: QTBUG-106164 Fixes: QTBUG-106205 Pick-to: 6.5 Change-Id: Id37099811cf8e10dd510dc5f8086d1323f92af9e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QQuickWindow track changes via DevicePixelRatioChange eventDavid Edmundson2023-05-111-22/+11
| | | | | | | | | | | | | Qt core gained a new event on the window when the dpr changes. This is important as the window DPR can differ from the screen device pixel ratio, it also allows us to get rid of one level of the screen connection tracking. Fixes: QTBUG-113236 Change-Id: I43f50a0ef98653553ea177dc72e1522036452496 Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QQuickItem: Do not synthesize replace() for data/resources/childrenUlf Hermann2023-05-092-13/+72
| | | | | | | | | | | | | Those properties are not actually sequential containers. They have some internal logic that refuses certain operations and changes the semantics of others. We should not run things like splice() on them. We can natively implement removeLast(), though. Pick-to: 6.5 Fixes: QTBUG-112949 Change-Id: Ic9fa84f98a68428df9e958ba7fc72b0987e8601f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickFlickable: avoid processing the same event twiceRichard Moe Gustavsen2023-05-021-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If Flickable has an exclusive grab (e.g if it's being dragged), and at the same time, a child has a passive grab (e.g a TapHandler inside a child of the content item), Flickable ends up getting the same pointer events twice. The reason this happens is because Flickable has a childMouseEventFilter. So the flickable will first get all the pointer events since it has an exclusive grab, just to see that the filter will receive the same events once more, as they next are delivered to the passive grabbers. The result is that Flickable will handle all pointer events (move, release etc) twice when it has en exclusive grab, which will even cause the flickable from stop flicking prematurely if the mouse release ends up outside the bounds of the flickable (because of a double call to handleReleaseEvent(), which will set stealMouse to false too early). To fix this, this patch will make sure that we don't handle any pointer events in the childMouseEventFilter if we already have an exclusive grab. After all, having an exclusive grab means that we're already getting the events the "normal" way, and shouldn't handle the same events once more. Fixes: QTBUG-104987 Pick-to: 6.5 6.4 6.2 Change-Id: Iaed49cb860cf50ea38a70a6e546d9dcf25cce444 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Flickable: Send movement signal when flick startsSeokha Ko2023-04-291-1/+8
| | | | | | | | | | | | | If there are multiple moves between touch down and release, but they are merged, or if there is only one move, flick occurs but no movement signal is generated. So, send movementStarted if the view is moving in handleReleaseEvent Fixes: QTBUG-112924 Pick-to: 6.2 6.4 6.5 Change-Id: I774799bac2a00296a72005dcfa9ade6683836d08 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Hook up GPU frame timing to QQuickGraphicsConfig and the logsLaszlo Agocs2023-04-253-4/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | The idea being that setting QSG_RHI_PROFILE=1 will not just enable debug markers (which is only actively used in Quick 3D right now), but also timestamps, and then we can start showing GPU frame times from the GPU side with Vulkan, Metal, and D3D11 atm. (the only catch is that the value is heavily asynchronous and is always referring to a previous frame, usually current - 2, but may be up to current - 4 etc.) In addition to the env.var., the setter/getter API is added to QQuickGraphicsConfiguration. In the end they all maps to the QRhi::Timestamps flag. Once enabled, the renderloop timing log, both with threaded and basic, will start including a new line, as long as the underlying 3D API supports timestamp queries or similar. (in practice this is implemented for Metal, Vulkan, and D3D11 for now) [ChangeLog][QtQuick][Scenegraph] The scenegraph render loop timing logs can now show GPU-side times as well, as long as the application is launched with the env.var. QSG_RHI_PROFILE=1 or the feature is enabled via the new APIs in QQuickGraphicsConfiguration. Change-Id: I42202882b418e12028d6a287c19352a8fb893365 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* qquickwindow: Clear hover when a window is hiddenDavid Edmundson2023-04-251-0/+2
| | | | | | | | | | | | | | | | | This fixes a bug in the following sequence: - user opens a window - the window is hidden whilst under the mouse - later the window is reopened without the mouse being under the window - with the lastMousePosition set an item underneath where the mouse used to be gets activated. On X11 we get a Leave event for the hidden window, this is not true for wayland. Pick-to: 6.5 Change-Id: Ib14e8dbe29f1ad9a71a488b671d226be1d017b8d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Accessibility: respect value in attached Accessible in controlsVolker Hilsheimer2023-04-212-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickItemPrivate::accessibleRole is virtual and called by the framework to determine the role of an item. The default implementation checks and respects a possible Accessible attached object. However, subclasses that override the virtual don't, so the attached properties are ignored, and the class-specific implementation wins. This makes it impossible to change the role of e.g. a checkable button. To fix that, move the code respecting the attached object into a non- virtual function that the framework calls instead, and only call the virtual member if there is no attached object, or if that object is not initialized with a role. Replace calls to the virtual from the framework with calls to the non-virtual wrapper. Do this for both QQuickItem and for QQuickPopup, and adjust the logic in QQuickControl types that create an attached object and initialize it's role when accessibility becomes active. Use the non-overridable effective role value for that as well. Add a test case, and to avoid any new framework calls to the virtual, make it private. Fixes: QTBUG-110114 Pick-to: 6.5 6.2 Change-Id: Ia709cecbd181b6d8ee3297a4af60c1e7db9a2c51 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* QQuickItem: item stays pressed after DoubleClicksSami Shalayel2023-04-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Amends 72651a50f83aa72998822312c7b5c6235d28978f. This commit decided to ignore double clicks in the virtual QQuickItem::mouseDoubleClickEvent(). If a subclass inheriting from QQuickItem wants to not ignore a double click, it should override mouseDoubleClickEvent() and handle the double click event accordingly. Fix QQuickMouseArea::mouseDoubleClickEvent(QMouseEvent *event) to *not* call the base implementation in QQuickItem after handling a double click, because QQuickItem sets that double-click MouseEvent back to the ignored state. This was leading to weird behavior on platforms with touch screens like Android or IOS where buttons "got stuck" after a double click. Fixes: QTBUG-112434 Fixes: QTBUG-109393 Pick-to: 6.5 Change-Id: I774189fbcb356b07336f35f053e05a12c34ce602 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QQuickItemView: Skip instantiating delegates if size is 0Fabian Kosmale2023-04-203-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the area of a (List|Grid)View is 0, then instantiating delegates is pointless, as they couldn't be shown anyway. However, our current logic could not handle this case well, and would end up instantiating a delegate for every delegate entry if their size also ended up being 0 - you can after all fit infinitely many 0 sized items into a zero sized container. Detect this situation in QQuickItemViewPrivate::refill and the applyInsertionChange implementations. Note that we only exit early if there are no visible items and the view is zero-sized; if there are visible items, we still want to ensure that they are removed after all. We also need to adjust a few tests which had zero sized views to no longer be zero sized; otherwise they wouldn't have created their delegates in time. [ChangeLog][QtQuick][ListView][Important Behavior Change] If a ListView has size zero, it won't instantiate any delegates until its size becomes non-zero. Pick-to: 6.5 Fixes: QTBUG-110625 Fixes: QTBUG-89568 Fixes: QTBUG-51773 Change-Id: Ibe0e6fa5f01784016882522c120d2fee38df285b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickListView: relayout when section geometry changesWang Chuan2023-04-191-0/+8
| | | | | | | | | | | | | | | | | | | Section delegate items will now notify the ListView when their geometry changes. Enabling the ListView to call layoutVisibleItems to rearrange the delegate items based on the geometric changes made to the section delegate. The listener is added when the item is created or fetched from the cache. The listener is removed when the item is hidden or removed from the scene. Fixes: QTBUG-101985 Fixes: QTBUG-100002 Pick-to: 6.2 6.3 6.4 6.5 Change-Id: Ia7617424a8447ba82f62629d93b6a000a72bfc02 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: add a general statement about QQuickItem::visibleVolker Hilsheimer2023-04-181-1/+5
| | | | | | | | | | | | For items not added to a scene, the value of the property is somewhat unpredictable and should generally not be relied upon. Amends d1b9a4cacfb966cf0a37983d8f8044f3aedf5de3. Fixes: QTBUG-112838 Pick-to: 6.5 Change-Id: I4caf46d5497c676e870763d2cb7dcc9c00684f0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix word selection on touchTomi Korpipaa2023-04-181-1/+3
| | | | | | | | | | | | | The cursor position update on mouseReleaseEvent broke touch-and-hold word selection on touch devices. Now only do it if we don't have an active selection. Pick-to: 6.4 6.5 Fixes: QTBUG-111504 Fixes: QTBUG-110850 Change-Id: I5c63d8516d1eef3de10289c6d5c5b3d1d3e8623f Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* De-inline QQuickItemChangeListener destructor and export classVolker Hilsheimer2023-04-182-3/+6
| | | | | | | | | | | | | With all virtuals inline, every module that has types deriving from this class will have their own vtable for it, which is both unnecessary and dangerous if we want to dynamic_cast from or two this type. By de-inlining the destructor we pin the vtable of the class to QtQuick. Pick-to: 6.5 Change-Id: Iaf83a1d7391e73992a44d5cd651b0194ea43d31c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickItem: merge notifyChangeListeners overloadsVolker Hilsheimer2023-04-181-15/+7
| | | | | | | | | | | | | The two template methods did the same, we can use if constexpr to detect whether the function pointer is a member function pointer and call it on the listener object if so, otherwise as a free function. Refactoring, but enables bug fixes and stability improvements in follow up commits. Pick-to: 6.5 Change-Id: Idc3f81fd22f3246482fdc99fcdae43074c70d9df Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* MultiTouchArea: only subscribe to hover events when enabledVolker Hilsheimer2023-04-152-3/+11
| | | | | | | | | | | | | | | | | | | | | | On macOS we always subscribe to hover events in the constructor so that we can enable touch event handling when the mouse enters the area. However, a disabled item should not accept hover events, so we also need to override itemChange so that hover-acceptance is flipped based on the enabled state. Items should also never accept hover events, they should always propagate. As the events are accepted by default and ignored in the default event handler implementation in QQuickItem, we need to ignore explicitly when we override. Do that by calling the parent class implementation explicitly. A disabled MultiPointTouchArea should also not subscribe to touch events, even when the mouse enters. Fixes: QTBUG-107037 Pick-to: 6.5 Change-Id: Ifa57cb2af4fbf11a0c8eacde87d80e60afa3f895 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Use correct names for QEventPoint::State, PointerDevice::GrabTransitionShawn Rutledge2023-04-141-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Qt::TouchPointState is not the actual type here, and we should not encourage e.g. making a comparison between eventPoint.state and Qt.TouchPointMoved in an onGrabChanged handler. The equivalence is an internal detail; and eventPoint can come from any pointing device, not only from a touchscreen. QEventPoint is a Q_GADGET; we keep the registration to expose it as a value type (eventPoint). But such types cannot be created in QML, and we also need to give it an uppercase name to scope the enum values that it declares: that's a new foreign namespace called EventPoint. So it's possible to compare an eventPoint instance's state property against EventPoint.Pressed, and so on. Also show complete QML syntax in the \value tables where PointerDevice::GrabTransition is emitted to QML, namely PointerDevice::grabChanged and PointerHandler::grabChanged. Amends b43a873264d012dc0a0e574ea53335a40af8aa38 Task-number: QTBUG-102160 Change-Id: If1a97f21d8e005e3692298b8512f7f8b56a92c97 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix build with -no-feature-listview and itemviewsTasuku Suzuki2023-04-131-0/+3
| | | | | | | | | | | | | tested with each/all of below -no-feature-gridview -no-feature-listview -no-feature-pathview -no-feature-tableview -no-feature-treeview Pick-to: 6.5 Change-Id: I90cc7bc45bb9065000bc0fc7eeb8e80f02acb0d0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix PinchHandler.persistentTranslation; test cumulative native gesturesShawn Rutledge2023-04-111-3/+20
| | | | | | | | | | | | | | | | | | | | | Since we do not want persistentTranslation to be always the same as target.position, clearly we cannot use xAxis/yAxis to store the initial target position: thus the startPos() function was wrong, and is now removed. We need to store it in a separate m_startTargetPos variable like DragHandler does, and as PinchHandler did before 7867a683fcb938939fb2837a26ac8e1941e3fe08. Add an internal doc comment to clarify the arguments to QQuickItemPrivate::adjustedPosForTransform(). tst_QQuickPinchHandler::cumulativeNativeGestures() now checks the result of adjustedPosForTransform(): how far the target item moved. Pick-to: 6.5 Fixes: QTBUG-111220 Change-Id: I04237cb82a1abaaeab873a0d887acaf322f262ce Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Ignore tap events for table view when interactive is disabledSanthosh Kumar2023-04-112-1/+31
| | | | | | | | | | | | | | | | | | TableView uses QQuickTapHandler internally to handle tap events. This handler accepts tap events considering pointerNavigationEnabled property of table view. TableView accepts mouse events if either 'interactive' or 'pointerNavigationEnabled' property is set as true, otherwise, it has to pass mouse or touch events to the below item. This patch introduces QQuickTableViewTapHandler inherited from QQuickTapHandler that can explicitly check pointerNavigationEnabled property of QQuickTableView during wantsEventPoint to either accept or ignore tap events. Fixes: QTBUG-108596 Pick-to: 6.4 6.5 Change-Id: I330ae319706b6dbadc3a7319f62d636708aab995 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add missing Direct3D12 enum value to GraphicsInfoLaszlo Agocs2023-04-112-0/+2
| | | | | Change-Id: I2f379ab944e46ec3d5e4631ac32eb28126034b37 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Docs: fix typoVolker Hilsheimer2023-04-031-1/+1
| | | | | | Pick-to: 6.5 Change-Id: I0f04c9fd33f314f4c8c008085fdaeafb16878340 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Docs: fix a few linksVolker Hilsheimer2023-04-031-13/+14
| | | | | | Pick-to: 6.5 Change-Id: I2c1c632346d09aa75c85c5a1081a683ef05b1aba Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* AnchorChanges: Fix restore logicFabian Kosmale2023-03-291-2/+13
| | | | | | | | | | | | | | | | | | | The logic to decide whether a state change triggered a size change. When AnchorChanges did not remove all old anchors, we might end up with an anchor configuration that changes the size of an item (e.g., anchors.left and right being set), even if the new state only adds a single anchor, e.g. anchors.left. Moreover, we need to pass the correct dirty flags to setDirty, otherwise the UI will not actually reflect the state of the Item. As a driveby, fix an accidental double negation of qt_is_nan for height. Fixes: QTBUG-112354 Fixes: QTBUG-106677 Pick-to: 6.5 6.2 Change-Id: I6c456fbdc314672f4fcbe740d941b44183fd5500 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* doc: Use \value rather than \li for enumeration values and constantsShawn Rutledge2023-03-2818-657/+610
| | | | | | Pick-to: 6.2 6.5 Change-Id: Ica8354a53d0a5fb5dd1d8cd5f774dcdc56b6f99a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* doc: Improve BorderImage; make snippets scaleable, detailed; screenshotsShawn Rutledge2023-03-281-21/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This started with QTBUG-112322: introduce the border property next to the first snippet where it's used. - Give declarative-scalegrid.png a white background rather than transparent, to be consistent with the screenshots and to look better with a dark documentation style. - Make the snippets resizable so that it's possible to test the effects of the horizontalTileMode and verticalTileMode properties. - Get the borderframe.svg and .png files from the qtdoc repo (which ought to have been in this repo already, but perhaps not). - Resize borderframe.svg to 120x120 and set document size to match (in Inkscape); this makes it possible to use the svg directly in BorderImage, to test that QTBUG-25244 is really fixed. - Make the snippets match the screenshots (all 182px wide, with grey rectangle borders as shown). - It seems our scaling is smoother (less jagged) than in the old screenshots, so the new ones make a better impression. - Add region index labels to snippets and screenshots to be a bit less confusing next to the paragraphs that are talking about "parts of image in regions 2 and 8" and so on. Too bad they have to be so tiny. - Use \value rather than \li for enum values. Amends 1a84b190bd1a2781d03f13fa43ab92bf34809041 Pick-to: 6.2 6.5 Task-number: QTBUG-25244 Fixes: QTBUG-112322 Change-Id: I697ae1356eee62990b7903601cc493a04d3647a2 Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* doc: Fix some warnings (broken links)Shawn Rutledge2023-03-284-27/+25
| | | | | | Change-Id: I9ef36d761860b7b28c5e5e6e37826abfda9d998f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QSGDefaultPainterNode: Skip fillRect for invalid fill colorMorten Sørvig2023-03-231-0/+4
| | | | | | | | | | | | | | | | | | | | | The initial background can be skipped safely in cases where the painted item user code paint to all image pixels during the paint() callback. This makes for a performance improvement since we are then no longer filling all image pixels twice. Enable this behavior by interpreting an invalid fill color as "disable background fill". [ChangeLog][QtQuick][QQuickPaintedItem] Background filling can now be disabled by setting the fill color to an invalid color. This may improve performance, and is safe to do if the paint() function draws to all pixels on each frame. Change-Id: Ie403a92ec698df57954672fffb856cb200736886 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QQuickTableView: fix minor documentation issuesRichard Moe Gustavsen2023-03-221-28/+11
| | | | | | | | | Several documentation errors have sneaked in here and there. This patch will fix those issues. Pick-to: 6.5 Change-Id: I57beb9a39a06a8302e1e83f91078a8f3c1c50670 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QQuickTableView: only clear selections when selections are enabledRichard Moe Gustavsen2023-03-221-2/+4
| | | | | | | | | | | | | TableView should only modify a selection (which includes clearing it) when selections are enabled. Otherwise it should leave it to the application to modify the selection model explicitly. This can be used to set a selection that "sticks", regardless of what the user does. Pick-to: 6.5 Change-Id: I264946d1b3513846794e1fe12b7d94cfaef050ed Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* doc, HeaderView: add a code snippet to the documentationRichard Moe Gustavsen2023-03-211-0/+4
| | | | | | | | | Add a doc snippet to the HeaderView documentation that shows how can use it together with a TableView. Pick-to: 6.5 Change-Id: Id1043d2b6561f6e68e0ac120b7ba040760263314 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: add \since to Text's renderTypeQuality propertyMitch Curtis2023-03-201-0/+1
| | | | | | | | Amends cbbbfe3bff29d8db84771e07ac6f16209b0969d1. Pick-to: 6.5 6.2 Change-Id: If1247a4f2d347f5c8b4993e24b04736db45df80d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QQuickTableView: implement SelectedTapped correctlyRichard Moe Gustavsen2023-03-171-15/+20
| | | | | | | | | | | | | | | | The current implementation of SelectedTapped allowed the user to start editing when tapping on the _current_ cell. This is not correct, SelectedTapped is supposed to (like the name suggests) let the user start editing when tapping on a _selected_ cell. This patch will change the implementation so that the user can tap on a selected cell to edit it. Pick-to: 6.5 Change-Id: Ice5de9250c23f5f57e71077d4f46d1a3f31e9b80 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Export QQuickWheelEvent privatelyShawn Rutledge2023-03-131-1/+1
| | | | | | | | | | | | | | | | | It's mainly intended for QML use cases: both MouseArea and WheelHandler have wheel(QQuickWheelEvent *) signals. But the QML compiler generates C++, and other use cases are possible. For the signals to be useful in C++, their arguments need to be exported. Besides, the other classes in this file are exported the same way (for example 21b3b74c99e2ee8dedb711ba448066eb308979dc; some were made private in 83e820ba767c2d37600d3536ebcfde18234d2f46). QQuickWheelEvent was added in f2e1be963f885a6030136591414cdbda26d50695 Pick-to: 6.5 Fixes: QTBUG-111230 Change-Id: I448aa633c7e7deb2e5f12e29bcb1c449be00a63d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix multiple object creation in LoaderSanthosh Kumar2023-03-101-1/+1
| | | | | | | | | | | | | | | | | | | QML Loader creates multiple object of same component during initial loading, if sourceComponent is assigned within state configuration and it evaluates to be true. This happens due to the effect of evaluating stage change (here in this case, setting loader source component) during component completion which internally creates component object and makes loader status be ready, even before Loader instantiates object. This patch adds a guard to check loader status and avoids object creation if status is already ready. Fixes: QTBUG-111559 Pick-to: 6.2 6.4 6.5 6.5.0 Change-Id: I6c3456cd3bc35a717c139fbd3670c305304f480a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix bug when center aligning anchors on items with fractional sizesJan Arve Sæther2023-03-091-10/+2
| | | | | | | | | | | It seems that the old code assumed that all widths and heights were limited to integers (despite that the argument was qreal) Amends 50482f69af0b9392424dfdad5376fcb09be36d46 Fixes: QTBUG-95224 Change-Id: I6d003eb09702828a39cb1172f6c62b7fe240ca60 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: fix links in contains/containmentMask docsMitch Curtis2023-03-081-4/+4
| | | | | | Pick-to: 6.5 6.2 Change-Id: Iae701dec938c5f126ebf90953af0733de775b385 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix build with -no-feature-quick-viewtransitionsTasuku Suzuki2023-03-0710-14/+230
| | | | | | Pick-to: 6.5 Change-Id: I609a843bddbd0776452d289b144dab803503a483 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Remove duplicate words (typos)Andreas Eliasson2023-03-072-4/+4
| | | | | | Pick-to: 6.5 6.4 6.2 Change-Id: Ibd29739b894598e5d7837ed5f9150e08ca07fa35 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix content position of list viewSanthosh Kumar2023-03-031-0/+6
| | | | | | | | | | | | | | | The content position of list view is incorrect, if populate animation is configured with BottomToTop or RightToLeft layout direction. This is because, we are not setting internal position for first item in the list view. This patch will set correct internal postion to the first item in list view. Fixes: QTBUG-111050 Change-Id: I1a233a938e2c088d176d79871a08bcd2a8edd6b3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix build with -no-feature-quick-draganddropTasuku Suzuki2023-03-031-2/+2
| | | | | | Pick-to: 6.5 6.5.0 Change-Id: I43504302c833a4e922128cae3d25b322f1a7f04f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Document the Pointer Handlers exampleShawn Rutledge2023-03-022-1/+3
| | | | | | | | | | | Animated gifs were captured with byzanz-record, then converted to webp: gif2webp -lossy -min_size -q 40 -m 6 -mt -metadata none in.gif -o out.webp Pick-to: 6.2 6.4 6.5 Fixes: QTBUG-96915 Change-Id: Iee2f4ef774de7862d93c7e4cdf7b2b5e0553bec4 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* ListView: Mention section's support for required propertiesFabian Kosmale2023-03-021-1/+2
| | | | | | | | | | It was used in the code snippet, but we didn't explain so far why it was there. Pick-to: 6.5 6.4 6.2 Change-Id: I53005d897f4a3732b7707c7cc0e88f2842ca7433 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* QQuickTableView: add more docs related to required propertiesRichard Moe Gustavsen2023-03-021-6/+33
| | | | | | | | | | The docs informing which required properties TableView supports are scattered a bit around. Document/mention them once more collected under the docs for the delegate. Pick-to: 6.5 Change-Id: Idacef9ceb486e936bef3800a8564b5cdc373f7a2 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>