aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/snippets
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-161-0/+64
|\ | | | | | | Change-Id: I192cb06f3b92869699cb3e072f2c6c1e8dbb1ef4
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-161-0/+64
| |\ | | | | | | | | | Change-Id: Ia93dc734ce25b3134b0f905f473a0c30777ceaf1
| | * Document TapHandler.tapped and [single|double]Tapped eventPoint argumentShawn Rutledge2019-05-091-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends b8fd580cb3453b3850c36765c4b2537538d2f4f8 to add documentation. The eventPoint is important to get ephemeral state from the pointing device: which button was released (thus triggering the tap), which device it was, and where the release occurred. Users may expect to use the point property, but QQuickHandlerPoint::reset(QQuickEventPoint *) resets every property of the point at the same time, so the architecture currently does not allow for mixed state, i.e. having correct button state but still holding leftover position information. It may be surprising for users, but the changes to the point property are an atomic transaction that occurs before the signal. Task-number: QTBUG-61749 Task-number: QTBUG-64847 Change-Id: I33e0e232084beba8e10d8b02fa3bf85f36293358 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Add WheelHandlerShawn Rutledge2019-04-272-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be used to change any qreal property of its target Item in response to wheel rotation, or it can be used in other ways that involve bindings but without a target item. [ChangeLog][QtQuick][Event Handlers] Added WheelHandler, which handles mouse wheel rotation by modifying arbitrary Item properties. Fixes: QTBUG-68119 Change-Id: I247e2325ee993cc1b91a47fbd6c4ba0ffde7ad49 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Add BoundaryRuleShawn Rutledge2019-04-271-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Qt Labs Animation] Added the BoundaryRule QML type, a PropertyValueInterceptor that restricts the range of values a numeric property can have, applies "resistance" when the value is overshooting, and provides the ability to animate it back within range. Change-Id: I677b407a351c12b0c5b23c34a45933154310c2cd Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Doc: improve Example Usage section of TableViewMitch Curtis2019-04-243-0/+92
|/ / | | | | | | | | | | | | | | | | - Make two sub-sections: C++ and QML - Add a TableModel example to the QML section Change-Id: Ib391b4c0a78e11f5130944b6ac99e20a5982a453 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* / Doc: Fix a code snippet in DragHandler QML typeTopi Reinio2019-02-251-1/+1
|/ | | | | | | Task-number: QTBUG-73900 Change-Id: I00875525450a91d6841e5e7a2af77b41e400ea46 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Move xmllistmodel to xmlpatternsv5.12.0-beta4Frederik Gladhorn2018-11-051-96/+0
| | | | | | | | | Latest changes moved to xmlpatterns: e08f9393acc6417598f328d7f4b7b082c5d57afa Change-Id: I7e3054a3f0f11833053746294e3b2b958047394d Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Doc: Fix QDoc warningsPaul Wicking2018-10-011-2/+2
| | | | | Change-Id: I19545953bde10d4ccc2f37843dcda2569dc77df4 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Doc: Remove documentation for deprecated QML typesVenugopal Shivashankar2018-09-251-68/+0
| | | | | | | | | | | | | VisualDataModel, VisualDataGroup, and VisualItemModel are replaced with DelegateModel, DelegateModelGroup, and ObjectModel respectively (since 7cad0e52c5a020bd29635e9912fd8946a6b48124). Also renamed/deleted a few snippet files and an image. Task-number: QTBUG-37725 Change-Id: I5fa93993a31d8f9b08e7a282d5550ddd9bfb813f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Update the 'reversible' Transition code snippetAlexander Akulich2018-09-111-5/+5
| | | | | | | | | - Use 'better' colors - Replace MouseArea with a TapHandler - Update QtQuick import statement Change-Id: I32c2ca87855ba1708ddc33329a05035a55bab82b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Fix 'reversible' Transition code snippetAlexander Akulich2018-09-111-1/+3
| | | | | | | | | | The Transition documentation refers to this snippet as an example of 'reversible' property usage, but the code actually misses it and demonstrate the last sentence: "If the transition did not set the to and reversible values..." Change-Id: I54da7dc2886006d8509891ba982f57b1ea97ebf0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Show that DragHandler is now a multi-point handlerShawn Rutledge2018-09-112-7/+7
| | | | | | | | | Inheritance changed, and that means it has a centroid property. Amends ca7cdd71ee33f0d77eb6bf1367d2532e26155cb2 Task-number: QTBUG-68106 Change-Id: Ie68eb1376868b143dd56564a3abc896dd7e745c6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Doc: Document TableView qml typeRichard Moe Gustavsen2018-09-045-0/+389
| | | | | | | Change-Id: Ic6722a3cae6b3b6a3933206f14e0b6f6613609d8 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Get rid of Qt.labs.handlers import, merge into QtQuick 2.12Shawn Rutledge2018-07-177-14/+7
| | | | | | | ... and clean up imports in examples, snippets and tests accordingly. Change-Id: I5bbe63afd2614cdc2c1ec7d179c9acd6bc03b167 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Teach Rectangle's gradient property to accept QGradient::PresetTor Arne Vestbø2018-07-101-0/+12
| | | | | Change-Id: Id640b596c1d8d52221f2f2be8807d6e245971bdc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devUlf Hermann2018-06-255-0/+270
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp src/quick/handlers/qquickhandlerpoint.cpp src/quick/handlers/qquicksinglepointhandler.cpp tests/auto/qml/ecmascripttests/test262 Change-Id: I8908ec8c6116ca626fbd269af7625d4c429429ca
| * Doc: Move literal codeblocks to snippet filesVenugopal Shivashankar2018-06-222-0/+56
| | | | | | | | | | Change-Id: Iff45ea6cf414717fd1cb0a194eef390a9f153838 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Doc: Move the code snippets to a separate snippet fileVenugopal Shivashankar2018-06-223-0/+214
| | | | | | | | | | Change-Id: I17671563f2beebe16ae1d08552854eaf44ae43ee Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Make the PathView doc snippet match the animated gif betterShawn Rutledge2018-05-251-2/+2
|/ | | | | | | | | | The docs explain that PathAttribute can be used to "scale and modify the opacity of the items as they rotate", but at first glance it's confusing to see the red/black color change in the code and wonder why it is not that way in the animated preview. Change-Id: I9f441a6342cea464644876834206e2923ce0f471 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Doc: Describe new 5.11 features in Image elementv5.11.0-beta4Eirik Aavitsland2018-04-131-0/+68
| | | | | | | | Add user documentation of the compressed texture file support and the file extension auto detection. Change-Id: Icfae8574dd3acba30e8275ccd6ff3438fa037868 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: correct references to snippetNico Vertriest2018-02-281-107/+0
| | | | | | | | | - replace by \quotefromfile statements from existing code - if no example in existing code: use \badcode - this makes dbransaction.js redundant Change-Id: I748fd1b3ee564556d71e9af5ca2dbc70ec37ecc2 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Document when anchors.fill can and can not be usedJan Arve Saether2017-12-021-0/+74
| | | | | | | | | It seems to be a common mistake to manipulate the geometry of child items. Be more explicit about it in the documentation. Task-number: QTBUG-63303 Change-Id: I80fd4f1d194c9b001b76e0fb88877c7c0cf488da Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* PointHandler: fix and improve the docsShawn Rutledge2017-11-231-0/+79
| | | | | | | | | | The qml module tag did not make it clear that it's in Qt.labs.handlers, not officially part of QtQuick yet. Some features needed better explanations. A snippet is helpful. Change-Id: Ie6a57510390bb376f20f5c1d98d8fc4c148af71b Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix outdated BSD license headerKai Koehne2017-11-157-14/+84
| | | | | Change-Id: Ib1fe267c23ea9fce9bcc0a91ed61081260338460 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-24129-382/+1672
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp src/qml/qml/qqmlimport_p.h src/qml/qml/qqmltypenamecache.cpp Done-with: Ulf Hermann<ulf.hermann@qt.io> Change-Id: I41ba7a592b2659ddf53da6952ea3b456a7bba319
| * Fix outdated BSD license headerKai Koehne2017-10-17129-382/+1672
| | | | | | | | | | Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta1Liang Qi2017-10-041-1/+0
|\| | | | | | | Change-Id: I75b0099b2b9ebb5cfb6f07b43b90b598743ae033
| * Doc: let TextEdit grow vertically in ensureVisible() snippetMitch Curtis2017-10-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Binding its height to the height of the flickable means that it's only as tall as the flickable, and hence cannot be interacted with beyond a certain point. The flickable was using the correct height (paintedHeight), which meant that the entire text could be scrolled, just not interacted with. Let it assume its implicitHeight so that it can grow freely. Task-number: QTBUG-48174 Change-Id: I853d0f505466e26e3100e79ff70210fcfa247f0f Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | improve documentation of DragHandlerShawn Rutledge2017-09-293-0/+172
| | | | | | | | | | Change-Id: Ifde67ba567b447da948b79d32676458fd0628ec5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | improve documentation of PinchHandlerShawn Rutledge2017-09-143-0/+169
| | | | | | | | | | | | Change-Id: If7acf359731a046637248d9b415b9e865365a068 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-052-3/+6
|\| | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickwindow.cpp src/quick/scenegraph/qsgrenderloop.cpp Change-Id: Idd7106995b5545fcac869e9056a365ef9edb36ca
| * Doc: Minor fixes to Loader QML type documentationTopi Reinio2017-08-292-3/+6
| | | | | | | | | | | | | | | | | | | | - Convert section titles to bookcase - Minimize line length for code snippets that are embedded in tables to prevent overflow. Change-Id: I316fc0fc4c3663397110d1ad1b8b83abce4af02e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge branch 'wip/scenegraphng' into devLaszlo Agocs2017-06-191-0/+52
|\ \ | | | | | | | | | | | | | | | Say hello to Shape. Change-Id: I1093feee4acc375e62bae1d351db0a7969a536d0
| * \ Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-04-031-0/+76
| |\ \ | | | | | | | | | | | | Change-Id: I0cbb2ba4a00580e6a74a4e4085fc4eb06d0fadae
| * \ \ Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-01-232-9/+36
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: I762e578aaf14a77efa26ce3fda2abb0e335003ea
| * | | | Add X axis rotation property to PathArcLaszlo Agocs2017-01-101-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is a standard feature of elliptical arc. While perhaps deemed too advanced for PathView purposes, rendering the path using PathItem must offer the ability to specify a non-zero X axis rotation for the ellipses of which the arc is a section of. Change-Id: I53f01713b7e0e97c40f22d75d46f75a140830683 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-151-0/+46
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp Change-Id: I3c41b9fc9ba7d41741e4dd400402ae80dd7726d9
| * | | | Doc: add doc and examples to RegExpValidator QML typeNico Vertriest2017-06-131-0/+46
| | |_|/ | |/| | | | | | | | | | | | | | Change-Id: I0ebc06aec6d2392f613fb4c312c189cc1d90a184 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* / | | Be (somewhat more) consistent about the value of piEdward Welbourne2017-06-142-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Use M_PI in C++ and Math.PI in JavaScript (including QML). Use qmath.h's value for M_PI where we can't avoid an explicit value. Task-number: QTBUG-58083 Change-Id: Iabe938aff62ceac27b939ec33c6ee5e854aac15e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-241-0/+76
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/quick/accessible/qaccessiblequickview_p.h src/quick/items/qquickmousearea.cpp src/quick/util/qquickanimatorjob.cpp tools/qmlplugindump/main.cpp Change-Id: I84474cf39895b9b757403971d2e9196e8c9d1809
| * | Doc: reinserted hello.qml which had been deleted by mistakeNico Vertriest2017-01-271-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | During the update of plugin.cpp this file was deleted by mistake. plugin.cpp still refers to it and it needs to be reinserted in src/quick/doc/snippets. Change-Id: Ie23c926ff6096392da96f0063c767009a3965a30 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | ListView: allow flicking to both directionsJ-P Nurmi2017-01-161-0/+15
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously flicking was restricted to the orientation of the ListView. [ChangeLog][QtQuick][ListView] Made it possible to enable horizontal flicking in a vertical ListView, and vice versa. The only thing apps must do is to specify the desired flick direction and the content width (vertical ListView) or content height (horizontal ListView), which is not calculated by ListView. Change-Id: Ic370e57f5d18679940d48e7a2c20c200b2ef36d1 Task-number: QTBUG-52553 Task-number: QTBUG-56501 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* / Doc: added support for JSON in localstorage documentationNico Vertriest2016-12-201-9/+21
|/ | | | | | | Added examples on how to store in JSON format Change-Id: Ief58e28d42cd87cc0829e9265670e7c7bbdbeffe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: better example explaining use of tx.executeSql with parametersNico Vertriest2016-10-261-7/+24
| | | | | Change-Id: I79ab2cc4c0525dbc285b04b3867220f6943dc9e6 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-211-0/+68
|\ | | | | | | | | | | | | Conflicts: src/qml/qml/qqmltypeloader.cpp Change-Id: I07647700fc86764c95a5ef95c568e700a70fe45f
| * Doc: Updated Local Storage QML Types documentationNico Vertriest2016-09-121-0/+68
| | | | | | | | | | Change-Id: Idbaff2def0ad7171cbca912b54b30d43ef7771bf Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Add imageSource property to attached Drag propertyAlberto Mardegan2016-05-071-0/+76
|/ | | | | | | | | | | | | | | | | | This property holds a URL which is loaded into a QPixmap via QQuickPixmap, and subsequently set on the QDrag object. This is especially important for drag and drop to external applications, where of course a QQuickItem cannot be dragged; however, combined with QQuickItem::grabToImage(), this change allows setting a QQuickItem's contents as the drag pixmap. [ChangeLog][QtQuick][Drag] Added imageSource property to attached Drag object: this allows drag sources to specify the pixmap to be drawn next to the mouse cursor when starting a drag and drop operation. Task-number: QTBUG-37366 Change-Id: Ibcf1d888c525e50976a116ec743ce6fca4c31525 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Move QtQuick.Layouts to qtdeclarative from qtquickcontrolsJan Arve Saether2016-02-261-0/+76
| | | | | | | | This is in order for it to be available without having to install Qt Quick Controls Change-Id: I3f0d0dc108829947cd189b7861944e556e00cef3 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-1912-168/+240
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>