Commit Graph

85 Commits

Author SHA1 Message Date
Joerg Bornemann f71e2f9955 CMake: Fix examples built as external projects
Usage of a private module needs a respective find_package call now.

Change-Id: I20f7571e11ab9b2ca6d185b4834e72100d9ce2d6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-01-31 17:11:34 +01:00
Volker Hilsheimer 94109a8f95 Replace QImage::mirrored with QImage::flipped in rendercontrol example
Change-Id: I09e1ddc335ea77a6d15dcb160e58ab01919ceee1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-12-02 17:24:22 +01:00
Shawn Rutledge 5e69fed692 Fix warnings in rendercontrol_rhi example
Task-number: QTBUG-130991
Pick-to: 6.8 6.8.1
Change-Id: Ie2afcc693ef13ab482229e77e62514183675e9e7
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-11-12 13:55:13 +01:00
Fabian Kosmale 2a32ec77c0 examples: Consistently require Qt 6.8
This prevents policy warnings in a few cases, and we want people to
opt-in to new policies, so make our examples copy'n'paste friendly.

Pick-to: 6.8
Task-number: QTBUG-126201
Task-number: QTBUG-126468
Change-Id: Iefa666b61c2d2f767da3583f0f6efd8e4a2169e5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2024-07-03 08:43:43 +02:00
Alexandru Croitor a6bd1dc3e0 CMake: Add deployment API to our examples
Projects were modified using the tool at:
https://git.qt.io/alcroito/cmake_refactor

A few examples had to be adapted manually, mostly those that build
additional qml modules / plugins.

The INSTALL_EXAMPLESDIR and INSTALL_EXAMPLEDIR assignments were
removed, these are not needed anymore because example directory
selection is handled by the qt_internal_add_example calls.

The install(TARGETS) calls were modified according to our
documentation snippets for qt_generate_deploy_qml_app_script.

A qt_generate_deploy_qml_app_script call was added for each
executable target.

Note that the deployment step will be skipped in the CI for now,
because:
- we enable QT_DEPLOY_MINIMAL_EXAMPLES in the CI instructions and thus
  set QT_INTERNAL_SKIP_DEPLOYMENT to true
- standalone examples feature is not yet enabled in the CI, which
  means we continue to build examples in-tree, and deployment is
  disabled for in-tree prefix builds.
A small list of examples to deploy in the CI will be chosen in the
future, to ensure deployment coverage, without slowing down overall CI
times due to all the *deployqt invocations.

Even if deployment is disabled in the CI, the install(TARGETS) calls
for each example will still run, installing into an
'installed_examples' directory, which will not be archived by the CI.

The QtBundleQmlModuleForMacOS and bundle_shared code was removed,
because we can now depend on the MACOS_BUNDLE_POST_BUILD option of the
deployment api, to ensure macOS bundle examples run properly in the
build dir. This works even in prefix in-tree builds, when installation
deployment is disabled.

Finally, for all examples that build additional qml module libraries or
plugins, the libraries / plugins must be installed into the bin dir of
each project, along with a qmldir file.

This is to support running the installed project for platforms that
don't have deployment api yet, like boot2qt / yocto.

If we want to have super clean install / deployment rules in the
future, we won't be able to avoid adding ugly per-platform conditions.
The current status quo is deemed an improvement over what we had
before.

Pick-to: 6.7
Task-number: QTBUG-101340
Task-number: QTBUG-102056
Task-number: QTBUG-102057
Change-Id: I843d934668c25dbcd1abca52495b393579633fc5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-03-27 18:57:34 +01:00
Tor Arne Vestbø 655ff8592b Use new Qt configure feature for Metal
Change-Id: I603018d3f4c6a49c39f7daed25101c24edbbfc02
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-25 19:03:08 +01:00
Lucie Gérard 53295d9102 Correct license for examples files
Example takes precedent over build system file type.
According to QUIP-18 [1], all examples file should be
LicenseRef-Qt-Commercial OR BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7 6.7.0
Task-number: QTBUG-121787
Change-Id: Ie8c2539e7659f53a1fd6b48f99ee883ee9aeb0a7
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-21 10:41:29 +01:00
Even Oscar Andersen a67e6bd1ad wasm: rendercontrol example -background color
This fixes the background color of the rendercontrol
example.

Essentially we cannot assume the OpenGL background color
is stored in the state, and need to set it every frame

Change-Id: I5bb14f10c4049ca2e5657cceb4550e23fbf4d968
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
2024-03-16 09:06:19 +01:00
Jaishree Vyas 486cc33ce5 Doc: Create separate Graphics and Multimedia example categories
Fixes: QTBUG-117884
Pick-to: 6.6 6.7
Change-Id: Ib0bb6217c29795fe50efdf827aa9902bbd572032
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-01-17 15:36:27 +01:00
Eskil Abrahamsen Blomfeldt 85e65e101b Add license headers to shader source
Pick-to: 5.15 6.2 6.5 6.6
Change-Id: I007eaddf0a3a9e7e6242d4e02b487fa0806c96a7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-10-30 10:30:37 +02:00
Jaishree Vyas 46fc095ae4 Doc: Add example categories for qtquick
Task-number: QTBUG-116334
Pick-to: 6.5 6.6
Change-Id: I993b6157c3ef8a69e4e218d62596b5219ab4b34b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-09-26 14:08:47 +02:00
Topi Reinio 83ba6a889f Doc: Fix undocumented parameters and broken links
* src/qml/jsapi/qjsengine.cpp:
    (qdoc) warning: Can't link to 'qvariant_cast()'

* src/quick/items/qquickrhiitem.cpp:
    (qdoc) warning: Undocumented parameter 'item' in
    QQuickRhiItemRenderer::synchronize()
    (qdoc) warning: Can't link to 'msaaColorBuffer()'
    (qdoc) warning: Can't link to 'resolveTexture()'

* src/quick/scenegraph/util/qsgtextnode.cpp:
    (qdoc) warning: No such enum item 'Text.NativeRendering' in
    QSGTextNode::RenderType
    (qdoc) warning: Undocumented parameter 'color' in
    QSGTextNode::setColor()
    (qdoc) warning: Undocumented parameter 'color' in
    QSGTextNode::setSelectionColor()
    (qdoc) warning: Undocumented parameter 'viewport' in
    QSGTextNode::setViewport()

* examples/quick/rendercontrol/rendercontrol_rhi/doc/src/
  rendercontrol_rhi.qdoc:
    (qdoc) warning: Can't link to 'QWidget-based'
    (qdoc) warning: Can't link to 'QAnimationDriver'

Mark all documentation modules in qtdeclarative as free of warnings.

Change-Id: I97cc059701c351b53cdeeb5fc2feff923c5a76a8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-09-15 10:04:17 +00:00
Laszlo Agocs 47680a6276 rendercontrol_rhi example: Fix some broken indentation
Change-Id: I57d94e5362ea1d86dd7835678436cdd6e5ad6ad5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-09-04 14:55:16 +02:00
Laszlo Agocs 0e1e111f06 rendercontrol_rhi example: Make the custom animation driver optional
Change-Id: Ia9b25c87452eb4ede47f5464294857aa5c6fdc2e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-09-04 14:55:14 +02:00
Laszlo Agocs 33ab96f8e3 rendercontrol_rhi example: Add a checkbox to exercise mirrorVertically
Change-Id: Ia8ff0162db51e9e7c6eb6fb38df1ca28a47935fc
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-09-04 14:55:11 +02:00
Laszlo Agocs 8024e182f6 Add a QRhi-based QQuickRenderControl example
Task-number: QTBUG-113331
Change-Id: I638e0f2483bf88d6fff3ad929ea6714e64fa199b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-08-15 14:13:32 +02:00
Laszlo Agocs a13afbaf12 Fix qmllint warning in rendercontrol examples
Pick-to: 6.5
Change-Id: I6652f54d7b5eaba763565d155a868ba4b277f07d
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-05-16 16:08:11 +02:00
Kai Köhne 2e6403f8bf Examples: Use versioned CMake targets for Qt modules
Use e.g. Qt6::Core instead of Qt::Core. This is better matching the
find_package(Qt6 ...) call, and also avoids issues that the versionless
targets have.

Pick-to: 6.5
Task-number: QTBUG-113277
Change-Id: Ib80f885e9f73fb9ad54b9e9b22cae2318877dc07
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-02 12:12:35 +02:00
Amir Masoud Abdol 8f7080fd09 Replace AUTO_RESOURCE_PREFIX with Qt CMake Policy in examples, tests
Every instance of AUTO_RESOURCE_PREFIX has been replaced by either
qt_standard_project_setup(REQUIRES 6.5) or with
qt_policy(SET QTP0001 NEW), mainly in tests.

In addition, I added a warning message for the case where
AUTO_RESOURCE_PREFIX is used.

Pick-to: 6.5
Task-number: QTBUG-96233
Change-Id: I323a15e9d0bb5fe6ba649365314af9fc2ad67bda
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-02-21 19:45:44 +01:00
Ulf Hermann 2d44365f69 CMake: Allow omitting the version of QML modules
Also, drop all the VERSION 1.0 lines from the examples and tests. 1.0 is
actually a bad default version since it's before all the Qt versions.

[ChangeLog][QML] You can now omit the VERSION argument to
qt_add_qml_module(). This will automatically generate the highest
possible version.

Pick-to: 6.5
Task-number: QTBUG-99146
Change-Id: Ic10ec69b87c224e0e94e1785f65653815d4c778c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-01-27 19:16:39 +01:00
Oliver Eftevaag 7409c217e8 Quick examples: Modernize cmake files according to our guidelines
The following changes are made to the CMakeLists.txt files in all
quick examples:

- Use PRIVATE linkage when possible.
- Use qt_standard_project_setup()
- Set WIN32 and MACOSX_BUNDLE in qt_add_executable() instead of
  set_target_properties()

Pick-to: 6.5
Change-Id: I18217585aec56794b327f103d6959879df59d68a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-16 16:16:47 +01:00
Laszlo Agocs 81b6cc7ebb Fix typo in rendercontrol_d3d11 example
Clearly nobody has run this in recent history.

Change-Id: I77aa8acc1de1346ded034ccd47682afaba2efe2b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-11-03 15:56:06 +01:00
Lucie Gérard 1b9808737a Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: Id89ed14990804a5024183e75382cc539d4293da1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-09-07 17:01:30 +02:00
Lucie Gérard 5a7b716474 Add license headers to cmake files
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.

Existing copyright statements remain intact

Task-number: QTBUG-88621
Change-Id: I72c89a98c42bbc9234d8495e9e503bec81d11037
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-08 10:41:06 +02:00
Ulf Hermann d270c51f81 Adapt examples to AUTO_RESOURCE_PREFIX
Examples that don't explicitly set NO_RESOURCE_TARGET_PATH get the
AUTO_RESOURCE_PREFIX now.

Task-number: QTBUG-103452
Change-Id: I6b41e96ce5620079f60ca2f967b0a2e611c1f738
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2022-06-24 08:45:43 +02:00
Lucie Gérard 0dc4fd240a Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-06-11 08:05:15 +02:00
Ulf Hermann d8dc3507d0 Examples: Add missing header files to the CMakeLists.txt
It's generally a good idea to state the headers. Let's teach our users
to do so.

Change-Id: I50b81d6724bce1f7e5aa6ed4491fcc63e21a0247
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2022-06-07 09:33:29 +02:00
Kai Köhne e2138561df Use QSGRendererInterface::OpenGL in documentation and examples
QSGRendererInterface::OpenGLRhi is only an (undocumented) alias to
...::OpenGL, so let's use that instead.

Amends 0b2311a62b

Pick-to: 6.2 6.3
Change-Id: I4acdd39dc1d9b75bed5c474667a43b4ad86e7f47
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2022-02-14 11:38:10 +00:00
Kai Köhne 9d82f4bff8 Improve examples CMakeLists.txt
- 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

Pick-to: 6.3
Change-Id: I0d6bfb06c4b25e9921d3d2bf31d977150f12b31b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-24 13:25:13 +01:00
Oliver Eftevaag 88dfbe0dea Rendercontrol example: use new cmake api
Updating the CMakeLists.txt files in the d3d11 and opengl version of
the example to use the new qt_add_qml_module() function instead of the
old qt_add_resources()

Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: Ida43e4b0c875951a85d754b3a96f88366b580e24
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-15 23:07:17 +01:00
Andrei Golubev 3f2816ff6e rendercontrol_d3d11: Explicitly include qt_windows.h
Prevent accidental inclusion of windows.h through d3d11_1.h where
max/min are defined as macro. That causes the subtle error elsewhere
within the example

Change-Id: I527c53ecbc82204a1f087719f5b0b4736d8c3447
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-10-29 17:49:13 +02:00
Ulf Hermann 405bbc1c0e Remove .prev_CMakeLists.txt
We don't need to use pro2cmake anymore here.

Pick-to: 6.2
Change-Id: Iba8bac70c1fe31e56bf9680608913cc2c336f946
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2021-08-31 11:26:11 +02:00
Joerg Bornemann b4ab58d791 Raise cmake_minimum_required to VERSION 3.16 in examples
Pick-to: 6.2
Task-number: QTBUG-95636
Change-Id: I9f76b787533dad1c469fbb8c69df6c27b20a9aa3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-08-17 13:48:14 +02:00
Laszlo Agocs d3412cddab rendercontrol examples: Exercise key event generation as well
Task-number: QTBUG-93489
Change-Id: Ife9db7b066add1f41de964d4c41309568f954320
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-06-15 11:12:21 +02:00
Craig Scott 2422dd5a7a Switch examples to build as isolated sub-builds
Task-number: QTBUG-90820
Change-Id: Id9157526898ba72cb64ee8256639b37357f7bacf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-05-27 21:08:14 +10:00
Laszlo Agocs aab39f5d5d Enable rendercontrol_d3d11 example for MinGW
Pick-to: 6.1
Fixes: QTBUG-92839
Change-Id: Id17417b7ae010566b7f78ea1a6b2cc8fe6abc5e3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-05-19 14:41:08 +02:00
Alexandru Croitor 20d5e2d7ef CMake: Regenerate examples to set the WIN32_EXECUTABLE property
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>
2020-10-26 23:38:39 +01:00
Alexandru Croitor 903252b240 CMake: Regenerate examples to use qt_add_executable
Task-number: QTBUG-87661
Change-Id: Ie5bba408000211b24694aa0143bdf79c4a298f42
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2020-10-20 09:32:34 +02:00
Volker Hilsheimer 38b9c4f327 Fix additional warnings from usage of deprecated APIs
Replace more QLibaryInfo::location with QLibraryInfo::path

Replace old event accessors APIs, including relevant comments.

Change-Id: Ie205fc93b6e1c0dfb3dca9100fbde417ab68fc9f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-09-16 16:24:21 +02:00
Laszlo Agocs ccb9eb0cc1 Follow QQuickGraphicsDevice changes in QQuickRenderTarget
They are not strictly related of course, but the API pattern should be
kept. We can also move away from the QSGTexture dependency which is good
since that was never directly related.

Change-Id: I9aedff5918443bda3d6e3ee1ea389071222d1ad7
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-06-26 21:08:06 +02:00
Laszlo Agocs 4e266103ad Rename setSceneGraphBackend to setGraphicsApi
...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>
2020-06-22 16:10:52 +02:00
Laszlo Agocs 9943181dcc Move resetOpenGLState() to QQuickFbo
QQuickWindow should not have OpenGL specifics in its API in Qt 6.

However, resetOpenGLState() is used by applications commonly in
combination with QQuickFramebufferObject (not the least because the
documentation recommends it!). This is no problem in practice because
QQuickFramebufferObject remains an OpenGL-only feature. So to minimize
the breaks, move the function into QQuickFramebufferObject::Renderer so
any application that calls the function can continue to do so by just
calling it on 'this' instead.

The rendercontrol_opengl example used to call this function as well, but
unnecessarily, it will still function the same way without it.

Note that there is a chance that there are applications that call
resetOpenGLState() in other contexts, for example in slots connected to
before or afterRendering(). For these it will need to be determined if
the call is necessary at all, and if it is, should be replaced by
(re)setting the appropriate OpenGL state manually instead.

Task-number: QTBUG-84523
Change-Id: I335599f77e8a84e347a44427eb1a1bf917796ee8
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2020-06-12 12:38:39 +02:00
Shawn Rutledge 212c2bffbb Replace calls to deprecated QEvent accessor functions
Several event accessors were deprecated in
qtbase/24e52c10deedbaef833c0e2c3ee7bee03eacc4f5.

Replacements were generated by clazy using the new qevent-accessors check:
$ export CLAZY_CHECKS=qevent-accessors
$ export CLAZY_EXPORT_FIXES=1
$ ../qt6/configure -platform linux-clang -developer-build -debug
  -no-optimize-debug -opensource -confirm-license -no-pch QMAKE_CXX=clazy
$ make
$ cd ../../qt6/qtdeclarative
$ find . -name "*.clazy.yaml"
$ clang-apply-replacements .

Task-number: QTBUG-20885
Task-number: QTBUG-84775
Change-Id: I1be5819506fd5039e86b4494223acbe193e6b0c9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-06-11 22:00:19 +02:00
Oliver Wolff 9cefaca1ea Remove winrt
Task-number: QTBUG-84434
Change-Id: If8f57f00726868a3540c877d07fca761618e4f08
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-04 15:51:51 +02:00
Laszlo Agocs 8ac75dad2a Enable rendercontrol_d3d11 example in CMake builds
Change-Id: Ifd1526da4a792e783e47fc7bb952bdb188a6e5c1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-29 17:43:12 +02:00
Alexandru Croitor 965984771d CMake: Regenerate qtdeclarative/examples
Includes
- new example installation paths
- one case of QT_QMLTYPES_FILENAME addition

Change-Id: I24423da9b04b6ecc8445017fa35f148dd43b1829
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-05-29 10:01:22 +02:00
Laszlo Agocs 201f28c7e3 Skip d3d rendercontrol example on MinGW
We will not invest into adding workarounds in the example code
as the boilerplate to keep such unofficial environments working is
not worth the effort and compromises readability in example code.
Just skip building on MinGW.

Change-Id: If33bd0382f8cab4713ad45fcaa126830e9760af3
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-05-27 12:17:08 +02:00
Laszlo Agocs 16cb9dea7b Fix namespaced builds in rendercontrol example
Change-Id: Ic91d4c57e1d559d3ab2438e99c0c34ba2d1d9200
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-05-27 11:17:45 +02:00
Eskil Abrahamsen Blomfeldt 5d4d598354 Adapt to changes in NativeTexture in qtbase
To make the API less error prone, we have changed the
void pointer to the texture handle to a 64-bit in
instead, since all handles are maximum 64-bit.

Task-number: QTBUG-78638
Change-Id: I9d995d6a883b3377f57d7c5b19d4bc4e15aa347b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-25 13:39:32 +02:00
Laszlo Agocs 3475b5f3a8 Modernize the rendercontrol_opengl example
Make it work when using QRhi-on-OpenGL.

Some features like demonstrating a dedicated render thread, or targeting
the window with the Quick content ('onscreen' argument, not clear why
that was added in the first place), are now removed. Some of these could
be reintroduced in future examples, not necessarily in combination with
OpenGL. For now they are removed since the cost of porting and
maintaining all that is not reasonable at this point.

Task-number: QTBUG-84040
Change-Id: I67e5c7cc835c5cf5653cf827004ce66a4d300b36
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-18 16:09:55 +02:00