aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/quickwidgets/quickwidget
Commit message (Collapse)AuthorAgeFilesLines
* Use QSGRendererInterface::OpenGL in documentation and examplesKai Köhne2022-02-161-1/+1
| | | | | | | | | | | | QSGRendererInterface::OpenGLRhi is only an (undocumented) alias to ...::OpenGL, so let's use that instead. Amends 0b2311a62b25c Change-Id: I4acdd39dc1d9b75bed5c474667a43b4ad86e7f47 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit e2138561df3562c19000af24d43659090c19167a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve examples CMakeLists.txtKai Köhne2022-01-241-12/+4
| | | | | | | | | | | | | | | | | | | - Remove # generated from xyz.pro comment from pro2cmake - Remove "# special case" markers for pro2cmake - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Change-Id: I0d6bfb06c4b25e9921d3d2bf31d977150f12b31b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 9d82f4bff8520c3f6db7790d9044c3dfc5cc84c0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update quick examples to new QML CMake APICraig Scott2021-08-241-20/+9
| | | | | | | | | | | | This is a pre-requisite to being able to make qt6_qml_type_registration() an internal rather than public command. Not all examples have been updated, only those that were using the qt6_qml_type_registration() command. Task-number: QTBUG-95093 Pick-to: 6.2 Change-Id: I3f1814a29af608461daa90477eca0aa2304eb9d1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Raise cmake_minimum_required to VERSION 3.16 in examplesJoerg Bornemann2021-08-171-1/+1
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-95636 Change-Id: I9f76b787533dad1c469fbb8c69df6c27b20a9aa3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add missing "override" keywordsUlf Hermann2021-06-301-1/+1
| | | | | | | | Our examples should follow best practices. Change-Id: Ice90a818ae46e921b421e8d297806d8f7200294b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* CMake: Regenerate examples to set the WIN32_EXECUTABLE propertyAlexandru Croitor2020-10-261-0/+4
| | | | | | | | | As well as the MACOSX_BUNDLE properties as necessary. Task-number: QTBUG-87664 Task-number: QTBUG-86827 Change-Id: I46769fb543acb2cbeba122470b5e44ad478fbe4e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate examples to use qt_add_executableAlexandru Croitor2020-10-201-1/+1
| | | | | | Task-number: QTBUG-87661 Change-Id: Ie5bba408000211b24694aa0143bdf79c4a298f42 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Rename setSceneGraphBackend to setGraphicsApiLaszlo Agocs2020-06-221-1/+1
| | | | | | | | | | | | | | | | ...and fix up the docs. The string-based setSceneGraphBackend() stays of course (the docs have been enhanced, however). The GraphicsApi enum-based overload is now renamed to setGraphicsApi(). Using the same name for both functions is a historical artifact, reflecting the evolution (5.0 - 5.8 - 5.14). In 6.0 we can give it a more appropriate name, since it does not have much to do with "backends" from the user's perspective. Change-Id: Id75dbf81f50a148797e5b5de9be4000153737473 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CMake: Don't install .qmltypes for Qt tests, examples and toolsAlexandru Croitor2020-05-291-1/+0
| | | | | | | | | | | that don't have an explicit QT_QML_MODULE_INSTALL_DIR path specified. We don't want to pollute the Qt qml import path with these files. Task-number: QTBUG-84403 Change-Id: I768267e0e79daa8090d882c301648cce14e1a809 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Regenerate qtdeclarative/examplesAlexandru Croitor2020-05-291-1/+5
| | | | | | | | | Includes - new example installation paths - one case of QT_QMLTYPES_FILENAME addition Change-Id: I24423da9b04b6ecc8445017fa35f148dd43b1829 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Enable QQuickWidget with OpenGL over RHILaszlo Agocs2020-05-271-0/+3
| | | | | | | | | | | | | | | | | Also adapts to new NativeTexture format, where the actual handle is passed around instead of a pointer to it. [ChangeLog][QQuickWidget][Important Behavioral Changes] In earlier versions, the returned value from QQuickWidget::quickWindow() would persist for the life time of the widget. This is no longer the case, so if you are connecting to its signals, make sure you also connect to its destroyed() signal and update the connections when it is destroyed. Fixes: QTBUG-78638 Change-Id: I33cee8543ef1ff5d31555ed3ac18ba78c9c45102 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-291-3/+3
|\ | | | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: Ie3e9dc62031a85e5e81cbdf04694b95159d49fca
| * Quick: Don't qualify OpenGL includesUlf Hermann2020-01-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The headers are moving from QtGui to QtOpenGL. By avoiding the qualification we can keep them compiling either way. Also, add opengl-private to make the types available. Also removed the QGraphicsRotation hack to get access to the projected rotation function of QMatrix4x4. The function is public now. Task-number: QTBUG-74409 Change-Id: I216e8ca09f8e247f96627b081308e3a57c55c29c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Regenerate examplesAlexandru Croitor2020-01-291-0/+8
| | | | | | | | | | | | Change-Id: I39564d4b644a7ee367d9ce92b85426a5c2a122a4 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2020-01-162-2/+4
|\| | | | | | | Change-Id: I0c5b939c70bdb91ccdf7068784308416dcaa5736
| * Generate registrations for all examplesUlf Hermann2020-01-132-2/+4
| | | | | | | | | | | | | | | | Now that we can generate all QML type information at build time, we should also use it. Change-Id: I647c72bbe38fdb2deb565b75c86a696af3d15b61 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-142-1/+2
|\| | | | | | | | | | | | | Removed dependencies.yaml because we don't use it yet in wip/cmake. Fixed conflict in qmlcachegen.cpp. Change-Id: Ie1060c737bee1daa85779903598e5b6d5020d922
| * Specify parameters of type registration in class declarationsUlf Hermann2019-09-262-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using this technique we can automatically register all necessary revisions and minor versions of a type, using the metaobject system. This greatly reduces the potential for mistakes and resulting incompatibilities between versions of imports. We assume that for each type we need to register all revisions of its super types and its attached type, and that the revisions match. That is, if you import version X of type A, you will also get version X of its attached type and of any super types. As we previously didn't take these dependencies into account when manually registering the types, a number of extra revisions are now registered for some types. Potentially, we can now generate the qmltypes files at compile time, using moc. Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Regenerate ExamplesLeander Beernaert2019-10-141-2/+2
| | | | | | | | | | Change-Id: I2fbfb44bbb6d667e022bffb480feaf74ff0d0a5e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Update Examples with lowercase qt6_add_resources()Leander Beernaert2019-09-201-1/+1
| | | | | | | | | | | | | | | | Re-run pro2cmake on all exampls. Change-Id: Iafd1092beff023b407a8f29c2a5b651f2e534b75 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Convert ExamplesLeander Beernaert2019-08-231-0/+51
|/ | | | | | | | This patch converts all examples in qtdeclarative except for a few exceptions which require a public facing qml plugin api. Change-Id: I2cd2b1bb455be8b48796893a8235dea7f8b35aa2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* use the override keyword consistently and correctly (clang-tidy)Shawn Rutledge2018-02-271-3/+3
| | | | | Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* init variables where they are declared when possible (clang-tidy)Shawn Rutledge2018-02-261-3/+3
| | | | | | | | clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-247-23/+83
|\ | | | | | | | | | | | | | | | | | | 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 FDL license headerKai Koehne2017-10-171-5/+5
| | | | | | | | | | Change-Id: I76dccf547de40b5e72fd7abaa062fa96cb2c118a Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| * Fix outdated BSD license headerKai Koehne2017-10-176-18/+78
| | | | | | | | | | Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Qt Quick examples: Introduce QCommandLineParserFriedemann Kleint2017-10-181-2/+22
|/ | | | | | Task-number: QTBUG-60630 Change-Id: Iaf24e09fdec92f8af495a1288685f266c39be4a7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| * Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-2/+2
| | | | | | | | | | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-182-8/+28
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4variantobject.cpp src/qml/types/qquickworkerscript.cpp src/quick/scenegraph/util/qsgdefaultpainternode_p.h tools/qmljs/qmljs.cpp Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
| * 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
| | * 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>
* | | examples: replace 'foreach' with 'range for'Anton Kudryavtsev2016-09-031-1/+2
|/ / | | | | | | | | | | | | | | While touching the code, replace QStringLiteral with QL1S in QStringBuilder expression. Change-Id: I2519b254d82453e1c9bd5b834c0bd78e5c026f83 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* / 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>
* Merge remote-tracking branch 'origin/5.6.1' into 5.6Liang Qi2016-05-191-0/+3
|\ | | | | | | Change-Id: Ib7f8c60143c1efab279476dba390a3d9837ccc37
| * fix example installsOswald Buddenhagen2016-05-131-0/+3
| | | | | | | | | | Change-Id: Ie6a219392a48fd6b1a32037cc215dc20d408e819 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | purge unused imageOswald Buddenhagen2016-05-121-0/+0
|/ | | | | | | it's a duplicate from doc/images, so was presumably added by accident. Change-Id: Icfe75d4cb2682b42a2993e64f445295b10daca70 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Purge sRGB chunks from PNG in documentation.Edward Welbourne2016-03-241-0/+0
| | | | | | | | | | | | Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce -force Various tools grumble about sRGB tables in PNG images; and our handling of them doesn't pay attention to these, so purging them makes the images smaller with no loss to the images. Change-Id: I23d7a43ba6c6ce6cafa11c1950a118a73f4d07cd Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Purge sRGB chunks from PNGs in examples.Edward Welbourne2016-03-241-0/+0
| | | | | | | | | | | | Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce Various tools grumble about sRGB tables in PNG images; and our handling of them doesn't pay attention to these, so purging them makes the images smaller with no loss to the images. Change-Id: If3baf60fb7c0045446ddfddecef96374845e739e Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Port examples to new connection syntax.Friedemann Kleint2015-07-221-10/+7
| | | | | Change-Id: I121c59ac0ad56acb4cd54b99ecd37567368385ce Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fixed license headersJani Heikkinen2015-02-172-6/+6
| | | | | Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Update copyright headersJani Heikkinen2015-02-123-16/+16
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Finish render() support for QQuickWidgetLaszlo Agocs2014-08-111-1/+31
| | | | | | | | | The enablers are already in. Now we just need to use the virtual in QQuickWidgetPrivate and test it. Task-number: QTBUG-39562 Change-Id: I1faf5a0a244ba4169fb8f9b0dae657304038b60e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Add support for multisampling in QQuickWidgetLaszlo Agocs2014-06-061-2/+4
| | | | | | | | | | | | | | | | | Use a multisampled fbo when the requested format has samples > 0. Resolving happens after each rendering of the scene. The blit to the temporary non-multisampled fbo could be avoided, in theory, by sending the fbo instead of the texture id down the stack and performing a blit directly to fbo #0. This however involves a number of potential issues, for example due to the non-sharability of FBOs between contexts. Hence it is left as a future exercise. Task-number: QTBUG-39187 Change-Id: Iae98b969bcbc3bb57e6d73288496f5428913c826 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Add surface format to QQuickWidget.Laszlo Agocs2014-03-181-0/+7
| | | | | Change-Id: Id72a042588e37832a0d3757bad935c531ef8275a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Move Qt Quick Widgets example and document itTopi Reinio2014-03-147-0/+219
Because QtQuickWidgets is part of Qt Quick module documentation, its examples need to also be moved under the examples/quick directory structure. This change moves the example, creates minimal documentation for it, and adds a link to it from the QQuickWidget class reference. Task-number: QTBUG-37272 Change-Id: Iffb67849f150b9aaf0edaef5852364e93f7752b8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>