aboutsummaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Calqlatr Example: Pass the third arg to the mapToItem() callsVenugopal Shivashankar2016-12-091-2/+3
| | | | | | | | | | | | | | Apparently the mapToItem version used in the example requires at least three arguments, for some reason only two were provided, the item and the mouseX coordinate. Without the third argument, mouseY coordinate, the drag operation to move the display fails with warnings on the console. Task-number: QTBUG-57514 Change-Id: If1b16c27539bd90a2d20203dedc26f11ac2a0942 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* rendernode example: do not rely on build-time shader compilationLaszlo Agocs2016-11-225-22/+21
| | | | | | | | | | | | There is no public intrastructure for this. Relying on the internal qmake rule in qtdeclarative is wrong as it is not meant for public consumption and is not available in out of tree examples in the installed Qt anyway. Instead, ship the bytecode for now. Task-number: QTBUG-56327 Change-Id: I19327aa880ad573560d1e9376f36c67aa509b51a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QSGRendererInterface: Add Resource suffix for consistencyLaszlo Agocs2016-11-182-3/+4
| | | | | Change-Id: I60e674760725d4c4dd13f53b31c3abb6b09c1790 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Simon Hausmann2016-11-153-60/+67
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4string.cpp The conflict resolution for qv4tsring.cpp is to essentially omit the change of commit 64714ea431f2fd355ed27edc69dba4e992511e75 as the code in 5.8 already uses the add/mul_overflow functions. This merge also reverts commit f4ac007f4a19bc095ff15d415a6629986de78e49 as we can deal with dead store elimination now. Change-Id: Iee08c87cbe1a2ff23a73ce621d56262b4e007c56
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-151-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qmldevtools/qmldevtools.pro tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp Change-Id: I12255c16716bd8a74e7047cdb1f9302a4d1ea827
| | * Example: Enable auto scaling on HighDPI screensVenugopal Shivashankar2016-10-281-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-56425 Change-Id: I2246245216fb8cd0d4dc4b15a0687edfc64ccad1 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * | StocQt example: Prefetch values for stock list modelTopi Reinio2016-11-142-60/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of doing a network request for each item in the stock list, prefetch values for all entries when creating the model. This improves performance when scrolling the list. Task-number: QTBUG-56114 Change-Id: I12f0012ec0a97f2bf03b53a5b51076171cd7fc7a Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-271-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickwindow.cpp tests/auto/quick/qquicktext/BLACKLIST tests/auto/quick/qquicktextedit/BLACKLIST Change-Id: I8bd68b0b5e853b7908791d2cbddd18dd527c76ae
* | | Adjust positioners example for toolingThomas Hartmann2016-11-152-56/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fully qualify all property bindings * Not using flow as id, because it collides with the property flow These changes are required so the example works nicely in the designer. Change-Id: I05972a5a7ebe7277ae7f4230bb68a8b8b011b2f3 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | | Merge remote-tracking branch 'origin/5.6' into 5.8Simon Hausmann2016-10-131-1/+1
|\ \ \ | | |/ | |/| | | | Change-Id: I175b27337b534c0b8f46a4a792d2c43cde73ffc4
| * | Example: Use TextInput's displayText property instead of lengthVenugopal Shivashankar2016-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The replace Text item that is overlayed on the TextInput, behaves like the TextField.placeholderText property. The opacity of the item varies based on whether the TextInput has any text or not. Using the length property to adjust the opacity fails on platforms such as Android where the length is not updated until the text is committed (i.e. until you hit the [ENTER] key). Whereas the displayText property is updated when you key in text, so it is ideal to use the length of the displayText than the length property itself. Change-Id: I678e5db5e5d5027e4aae816b6620095c68138eb7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Use d3d12 feature in rendernode exampleLaszlo Agocs2016-10-114-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | Migrate the example away from config_d3d12 and make the feature public. Task-number: QTBUG-56327 Change-Id: I88809b8c41282cd75952d085cfd539a5d80f3f38 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8Liang Qi2016-10-102-8/+28
|\ \ \
| * \ \ Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-102-8/+28
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/quickwidgets/quickwidget/main.cpp src/qml/jsruntime/qv4jsonobject.cpp src/qml/jsruntime/qv4qobjectwrapper.cpp src/qml/jsruntime/qv4qobjectwrapper_p.h src/qml/qml/qqmlengine.cpp src/qml/qml/qqmlpropertycache.cpp src/qml/qml/qqmlpropertycache_p.h src/quick/items/qquickanimatedsprite.cpp src/quick/items/qquickitem.cpp src/quick/items/qquickitem.h src/quick/items/qquickitem_p.h src/quick/items/qquickview_p.h src/quick/scenegraph/qsgcontext.cpp src/quick/scenegraph/qsgdefaultrendercontext.cpp Change-Id: I172c6fbff97208f21ed4c8b6db3d1747a889f22b
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-302-8/+28
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I241cd418bb7e7b95e0a0a2ee4c465d48be2a5582
| | | * Enhance quickwidget example with all grabbing casesLaszlo Agocs2016-09-222-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a demo of QQuickItem::grabToImage(), in addition to grabFramebuffer() and render(). This way all possible approaches are demonstrated and tested. Task-number: QTBUG-55879 Change-Id: I13c427730c416f0d87f83092627e2cb46aba2cc4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | | Turn the no-network support into a configurable featureLars Knoll2016-10-101-2/+3
|/ / / | | | | | | | | | | | | | | | Change-Id: Ic70f60c124fe166b37fbe9b853735be3c5e0d46d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix sqlite detectionLars Knoll2016-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | There is now a sql-sqlite feature in qtbase that should get used. Change-Id: I99609a140b3a3c0acf749ff14df21fba89a978fb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Adjust decarative after qtConfig changes in qtbaseLars Knoll2016-08-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the changes are optional, but cleanup our QT_CONFIG usage. Change-Id: I5253d53f72f6fb03c2cfedae1e17d94f424a6bbb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | softwarerenderer example: fix ambiguous reference to QQuickItemShawn Rutledge2016-08-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 6 says (with paths trimmed) In file included from customrenderitem.cpp:47:0: softwarerenderer.h:51:35: error: expected ')' before '*' token softwarerenderer.h:61:5: error: reference to 'QQuickItem' is ambiguous Change-Id: I70b328426ac48f5f6140d1ad4f015858979b99a5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-172-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h src/qml/qml/qqmlobjectcreator.cpp Change-Id: I8bb7fe773d657f908f20ee5e72c2b9bd643f6260
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-132-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h tests/benchmarks/qml/qqmlimage/qqmlimage.pro tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp Change-Id: Iad11ce7fdf0c6d200fdebc16a94081bd8069a87a
| | * Shader examples: initialize all membersEdward Welbourne2016-08-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Coverity (CIDs 161677, 161674) caught us setting a bad example in our example code. Change-Id: I395f689586f9a6ad783328b9258096cbc9ccd692 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-091-2/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlcomponent.cpp tests/auto/quick/scenegraph/tst_scenegraph.cpp Change-Id: Ibc811b95a57f175ca53337db7bbd1f575a745937
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-051-2/+1
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h Change-Id: I1e6a9424e7f87d9e4ac1ea387ec70e151106f1c7
| | * photoviewer depends on xmlpatternsLaszlo Agocs2016-08-041-2/+1
| | | | | | | | | | | | | | | Change-Id: Ifc047a7492d0452c86777f1e6a5671421b7065d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QSG: Make example namespace-awareErik Verbruggen2016-08-031-0/+4
| | | | | | | | | | | | | | | Change-Id: Ic2c101d49f4140a85f2e9f79c8df78e38a4404f5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devLiang Qi2016-08-036-30/+7
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-026-30/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickshadereffect.cpp 5.7 had a bug-fix in code dev has replaced wholesale. src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h One side changed a method's signature; the other side renamed a method declared adjacent to it and changed some code using it, moving some from the public class to its private partner. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side added a blank line before a comment the other re-wrote. Kept the re-write, killed the stray blank. .qmake.conf Ignore 5.7's change to MODULE_VERSION. src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmlpropertyvalidator.cpp 5.7 changed code in the former that dev moved to the latter. Reflect 5.7's changes there, adapted to dev's form. src/qml/qml/qqmlobjectcreator.cpp One side added new QVariant types; the other changed how it handled each type of QVariant (without git seeing any conflict); adapted the new stanzas to work the same as the transformed ones. tests/manual/v4/test262 dev had a broken sha1 for it; so used 5.7's 9741ac4655808ac46c127e3d1d8ba3d27ada618e Change-Id: I1fbe2255b97d6ef405cdd1d0cea7fab8dc351d6f
| | * | Doc: minor spelling issueNico Vertriest2016-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I18316de7c0eaee98a7eb0aa274c06864af471116 Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-155-28/+5
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/demos/photoviewer/deployment.pri One side made it redundant; the other removed part of it; remove it all ! src/quick/scenegraph/util/qsgatlastexture.cpp One side changed a preprocessor condition, the other a code condition, on adjacent lines; keep both changes. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side changed a condition, the other the content of its block; keep both. Change-Id: Idb8937f92a7edb28212449dfe0c5cfdb8e6de986
| | | * PieChart examples: initialize membersEdward Welbourne2016-07-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity (CID 161680, 161678) pointed out that constructors don't initialize some members; getters would have returned drivel if called before setters. Unimportant but we should set a good example in our example code. Change-Id: Ia0483cfbe2cae379a0e84f10db1d8edc9cb5c52b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | * demos: Fix installation of photoviewer example and add to buildRobin Burchell2016-07-053-30/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | deployment.pri seems suspicious (and qmake errors about it actually), so just use the example install path and trust that it will be okay. Change-Id: Id3b6abd80f84485e006473130873ab89ee11c0d4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | | Add optional flags and rect to QSGRenderNodeLaszlo Agocs2016-08-026-1/+37
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having rendernodes triggering fullscreen updates with the software backend is not ideal. Therefore, introduce the option of reporting that the rendernode is well-behaving, meaning it only writes inside the reported bounding rectangle. Similarly, the OpenGL batch renderer can keep using the depth buffer when the rendernode is known to behave like the renderer expects. Change-Id: I6acc434432c2504776f26e8917b5434b44be293d Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | software: Add support for QSGRenderNodeLaszlo Agocs2016-07-197-6/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have to change getResource() a bit since it turns out it is not suitable currently for backends that do not have a per-window rendercontext and do not implement the interface on the rendercontext. Pass in the window to make sure it can always figure out which window we want the resources for. (we do not want rendererInterface() to return window-specific instances created on the fly, with ownership issues, so stick with the simple model where backends implement the interface on one of their existing classes) To support clipping, QSGRenderNode::RenderState is extended accordingly. Also updated the docs since some claims in the rendernode docs are not true since Qt 5.3. Change-Id: I34779c83926f5231b888fcab7131e873ae97964f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | D3D12: Fix the rendernode example for multisamplingLaszlo Agocs2016-07-012-1/+21
| | | | | | | | | | | | | | | | | | | | | Show how this can be handled in the custom QSGRenderNode implementation. Change-Id: Id6f18ca568a4850060f957998532815bce5c4ac5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-301-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/context2d/qquickcanvasitem.cpp src/quickwidgets/qquickwidget.cpp tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp Change-Id: Idf279cb88e0df2a383489af5b6afdf04d04ae611
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-291-0/+1
| |\| | | | | | | | | | Change-Id: I70c0c672708522f7157849365cc53ee271d8e460
| | * Add potentially missing include to qquickviewcomparison exampleLaszlo Agocs2016-06-211-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-54244 Change-Id: I38c3fff07ed2a5ff3ffddef1d523f110f0863ac0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Migrate shadereffects example to be cross-backendLaszlo Agocs2016-06-2915-94/+249
| | | | | | | | | | | | | | | | | | | | | | | | ...while demonstrating best practices like file selectors. Task-number: QTBUG-52914 Change-Id: Ibf7bca77b7b142f5ccb956e05efc5be974d53c79 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devLiang Qi2016-06-212-5/+7
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-212-5/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickflickable_p_p.h src/quick/items/qquickpathview_p_p.h tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp Change-Id: I77664a095d8a203e07a021c9d5953e02b8b99a1e
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-202-5/+7
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jit/qv4targetplatform_p.h src/quick/accessible/qaccessiblequickitem_p.h Change-Id: Ic95075a5fad81ec997a61561bd65979dfa3b9d4d
| | | * Fix build of textureprovider example with -opengl dynamicKai Koehne2016-06-132-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not link to OpenGL calls directly. Instead, use QOpenGLFunctions. Task-number: QTBUG-53841 Change-Id: Ic87bb78fede1ee9f75b81247406ad858b2bf7342 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | | Add a tab widget to QQuickWidget exampleLaszlo Agocs2016-06-207-4/+307
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...and include a tab with custom OpenGL rendering. Tab widgets are interesting because they are commonly used in applications in combination with widgets like QOpenGLWidget and QQuickWidget, and because they typically trigger rapid show-hide sequences which QQuickWidget does not always handle as well as it could. Thus this serves both as a helpful example and a useful testing tool. Plus it exposes at least two bugs already, namely that the continuous animation in the QQuickFBO does not start when switching to the tab containing the QQuickWidget in question, and that it is impossible to integrate third-party rendering code in a robust manner due to QQuickWidget destroying everything whenever hiding the widget. This is not what happens with a QQuickView and the normal render loops. Task-number: QTBUG-54133 Change-Id: Ie7d92cd0f685e4a26f4bb351cc023eb697a36bf4 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Enhance rendernode example with opacity supportLaszlo Agocs2016-06-035-22/+49
| | | | | | | | | | | | | | | | | | | | | | | | The opacity is already animated in the QML scene but enabling blending and using inheritedOpacity() was not done. Until now. Change-Id: Iaaf50c20302e29db85c5dfaeaab4d069cb18714e Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Only build textureprovider example when OpenGL is availableAndy Nichols2016-06-011-2/+3
| | | | | | | | | | | | | | | Change-Id: Ia4bae77ff66babb6eb8ff8c818bb5f842244ccc9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | One GraphicsInfo to rule them allLaszlo Agocs2016-06-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rename RendererInfo to GraphicsInfo. Deprecate OpenGLInfo and move the surface format properties into GraphicsInfo. Move also the shader info properties from ShaderEffect. Change-Id: I3b3f01080e059b3a30a132fd67de19a4bfca54ef Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Change graphicsAPI to graphicsApiLaszlo Agocs2016-06-011-1/+1
| | | | | | | | | | | | | | | Change-Id: I065f17abd1cb71cd8d6ead76abf7a544eb7a99c0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Refactor the rendernode exampleLaszlo Agocs2016-05-316-112/+94
| | | | | | | | | | | | | | | | | | | | | | | | By removing the Renderer abstraction it becomes easier to follow and understand. Change-Id: Iddacb461d51a75864983850660c5480985b3524f Reviewed-by: Andy Nichols <andy.nichols@qt.io>