summaryrefslogtreecommitdiff
path: root/examples/quick
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace 0 pointer constants with nullptrAllan Sandfeld Jensen2021-10-183-3/+3
| | | | | | | Replaced in most common patterns. Change-Id: Idcaff1f2e915f29922702d3600a2e5f1e2418a7a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix typo: alignment has an n in itEdward Welbourne2021-10-131-2/+2
| | | | | Change-Id: Ibe0ef16609a704042b964b4c29078c462820e602 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* DragAndDrop example: Update CMakeLists.txtOliver Eftevaag2021-10-064-61/+31
| | | | | | | | | This commit updates the drag and drop example to use qt_add_qml_module() in its CMakeLists.txt file. Pick-to: 6.2 Change-Id: I47fd28a1a114fe70986f73d4f2d87265255652a0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Flickable manual test: add sliders to adjust flick-speed metricsShawn Rutledge2021-10-041-6/+10
| | | | | | | | | | | | | | The sliders adjust maximumFlickVelocity and flickDeceleration. Also in the shared Slider: try harder to end up with value being the same as init, after initialization, by making the range of movement divisible by more numbers, by default. 180 is highly divisible, and keeps the default Slider size reasonable. You can still override the size of the Slider arbitrarily, though. Task-number: QTBUG-97055 Change-Id: I6fb41ccb87e401a747d5a8add3100053a06d9d88 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* CMake: Fix wrongly copy-pasted dependency in exampleAlexandru Croitor2021-10-011-1/+1
| | | | | | | | | Amends edc4357ae4893dd952ce1c07b180b4b334047606 Pick-to: 6.2 Task-number: QTBUG-96805 Change-Id: Iedbf372cd94b1b04db55685a5d05daca491200fe Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: Replace qmlscene with qmlShawn Rutledge2021-09-291-2/+3
| | | | | | | | | | We deprecated qmlscene in a9c93e2716a097c637515aded49a3308e257204b so we should stop recommending it in docs, too. Task-number: QTBUG-53219 Pick-to: 6.2 Change-Id: Ic729624a8ef849bd13f38087e20b5a410c5c5756 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Fix textballoon example when using a shared Qt on macOSAlexandru Croitor2021-09-291-0/+8
| | | | | | | | | | | | | | | Copy the qml plugin into the macOS app bundle just like we do for the examples that use the 'shared' project using the new add_qml_module_to_macos_app_bundle helper function. Amends 79cae5f6522bc259caa27b98031bfe84ef936744 Pick-to: 6.2 Fixes: QTBUG-96805 Change-Id: Ib22131a15f0cd06a7888ec991f5ec9f79045d202 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Refactor bundle_shared into a more reusable functionAlexandru Croitor2021-09-292-25/+37
| | | | | | | | | | | | | | | | | | | | Refactor the logic of bundle_shared into a more reusable add_qml_module_to_macos_app_bundle function that can be used in QtQuick examples that need to bundle the qml plugin on macOS, but don't use the 'shared' qml module plugin. The new function is placed in a QtBundleQmlModuleForMacOS.cmake file which can be included separately from the shared/CMakeLists.txt project. Amends 633a85cd39cdd294283439972cffebcff32ac0cb Pick-to: 6.2 Task-number: QTBUG-96805 Change-Id: Iebb3f4734b9a6bd8a8316bf5ae01d9740c442645 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Fix textballoon example when using a static QtAlexandru Croitor2021-09-292-2/+1
| | | | | | | | | | | | | | | Don't pre-create a qml module backing library, don't link to it directly and instead rely on regular qml plugin loading. This avoids undefined linker errors. Amends 79cae5f6522bc259caa27b98031bfe84ef936744 Pick-to: 6.2 Fixes: QTBUG-96805 Change-Id: I77acd086257e27e1933e9b36d7f0212765afceb3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Fix examples that use 'shared' project when using a static QtAlexandru Croitor2021-09-299-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a static Qt, linking of examples that use the 'shared' Qml module would fail with the following error Undefined symbols for architecture x86_64: "qt_static_plugin_sharedPlugin()", referenced from: StaticsharedPluginPluginInstance::StaticsharedPluginPluginInstance() in window_shared_init.cpp.o This happened because the 'shared' project pre-created its plugin target with qt_add_library instead of qt_add_plugin. qt_add_plugin passes an additional QT_STATICPLUGIN compile definition when compiling the moc'ed file to ensure that the QT_MOC_EXPORT_PLUGIN macro creates a qt_plugin_instance_PLUGIN_NAME symbol. Unfortunately we can't use qt_add_plugin for shared Qt builds, because some of the projects link directly against the plugin target and it's not possible to link against a MODULE_LIBRARY target which qt_add_plugin creates in shared Qt build. We could try to conditionally switch between using qt_add_library for a shared Qt build and qt_add_plugin for a static Qt build, but that further complicates the build system code because it requires specifying a class name and plugin type explicitly. Remove the direct linkage against the libraries in the examples and instead rely on plugin loading. This simplifies the logic of not having to pre-create a target. Amends 7b6eea37aeea55cdf1bcb1fd9c3091d6753f95e8 Pick-to: 6.2 Fixes: QTBUG-96805 Change-Id: I5b2f3992ccda29b59f1e99748005381c73daca69 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Ensure proper dependencies in bundle_sharedAlexandru Croitor2021-09-291-0/+4
| | | | | | | | | | | Ensure the shared qml module is built before it is bundled into the app's bundle dir on macOS. Pick-to: 6.2 Change-Id: I0b93fc54d1caa86070335347f5d2735eafe6819a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Large Text: populate only lines visible in Window into SGShawn Rutledge2021-09-291-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Text is rendered top-to-bottom: QQuickTextNode::addTextLayout() iterates lines of text. Now it first maps the window size() rectangle into the Text item's coordinate system, and treats that as the viewport: lines whose y coordinates fall outside are omitted. This saves a huge amount of time and memory when the text is large. So Flickable { Text { } } can actually be used in an ebook reader now, for example. QQuickItemPrivate::transformChanged(parent) is now used to inform all children when a parent moves; so e.g. when a content item is moved inside a "viewport" item (like a Flickable, or any other item that is being used as a clipping viewport or just as a holder), all children of the content item will be notified; and QQuickTextPrivate uses this occasion to mark itself dirty so that the updatePaintNode() will be called again. This happens directly after the actual movement: QQuickTextPrivate::transformChanged qquicktext.cpp 2990 QQuickItemPrivate::transformChanged qquickitem.cpp 5200 QQuickItemPrivate::dirty qquickitem.cpp 6339 QQuickItem::setY qquickitem.cpp 6830 QQuickFlickablePrivate::setViewportY qquickflickable.cpp 1800 Task-number: QTBUG-60491 Task-number: QTBUG-90734 Change-Id: I152d23caa725f194a186a604fbc8d0c07f597b16 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Use strict === equality for ScrollBar::orientationIvan Tkachenko2021-09-271-7/+7
| | | | | | Pick-to: 6.2 Change-Id: Icaf1bcda4a996cc3348911c87e43c4af2a246d73 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Shapes interactive example: use Controls canonically; architectureShawn Rutledge2021-09-271-259/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As long as we had the funcs array, it would have been nice to be able to directly get an index from whatever "tool" is selected. For example, TabBar has currentIndex; but TabBar is otherwise not a great fit here. But the funcs array wasn't so elegant anyway. So that prompts switching to the known OO design pattern in which drawing tools are objects containing functions that "do" the drawing, so that there's no conditional dispatch: just ask the tool to handle each mouse state change. I.e. here the DragHandler on the canvas uses the tool's shapeType Component to create the shape, but the DragHandler doesn't have to care which shape it is. Handles for moving the shapes' control points are also shape-agnostic: - a handle is a sort of template taking the path x and y properties to read and write - the handle initializes its position from those properties - the DragHandler inside gets to do what it does best: just drag the handle, nothing else (instead of needing to script the movement of both the handle and the control point, we don't script either one) - declarative bindings on the handle's position update the path properties whenever the handle moves And some styling: - Switch looks better than Button for toggling - use palette colors so that it looks good in dark mode too - fix handle colors getting stuck on yellow - borders on handles (yellow on white makes it hard to see the edge otherwise) - reorder curve types by mathematical order (line, quadratic, cubic) Pick-to: 6.2 Change-Id: Iefd980f428601840deb55370aad9256748855f07 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Move most of the pointer manual tests to a new pointerhandlers exampleShawn Rutledge2021-09-2446-0/+3262
| | | | | | | | | | | | | | | | | | | | | | | They were always meant to be examples eventually. Now they will be used for an example of how to implement custom controls using only basic items and handlers. Some components are very similar to those in the shared directory; but most examples will use Qt Quick Controls, so those shared components can be removed when we no longer use them. This example should remain as the one that shows how to build reusable controls "from scratch". Removed InputInspector because it's inefficient, has limited usefulness, tends to require building the manual test to be able to run it, and could be better built as a reusable Qt.labs component later on, providing a model with all known devices and taking advantage of the QPointingDevice::grabChanged signal to track the grab states rather than polling. Pick-to: 6.2 Change-Id: I47ab6ebb2cecab07a69cf96e546ffd0db3026a60 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Shapes example: give each qml file's root item a default sizeShawn Rutledge2021-09-2217-2/+32
| | | | | | | | | | | | | | | | Each square is resized anyway in shapegallery.qml; but for the sake of running individual examples on the command line with qml, the content being shown should be visible. Without this fix, each item had a 0,0 size by default; but the shapes themselves have their own sizes and are centered in the zero-size root item. But when a window is created, the window system does not allow it to have zero size, so it expands; and then the shape would be centered at the top-left corner, and you could only see part of it. Pick-to: 6.2 Change-Id: I42a537421430aea8233106353e9c2033f5bc5774 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix toplevel build againFabian Kosmale2021-09-081-0/+1
| | | | | | | | | | delegatechooser_shared also uses the shared directory, and thus needs the workaround. Amennds f4760b48bb994050afeffa5426671bc110cdcc8b. Pick-to: 6.2 Change-Id: If05694c2608b0e0a86993f0f2ace7b1640d039c7 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Fix top level builds failing with AUTOMOC-related missing moc exeCraig Scott2021-09-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | In top level builds, qt_autogen_tools() needs to be called on any target that enables AUTOMOC. A previous commit fixed that problem for the qt_target_qml_sources_example target, but missed also fixing it for the associated plugin target. Add that missed call here. More examples that use the common "shared" quick directory have also since been added, but the step that ensures qt_autogen_tools() was missed. Add them to the missing step. One of the existing steps also had a typo, which meant it wasn't handled either, so correct that as well. Amends 067253fb2f1aec3e03c577dd53ed2e6d903c28da Task-number: QTBUG-96118 Task-number: QTBUG-96159 Change-Id: I2fae5d9a1fd474b22e01ec51d5b1030237f3e08f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 215dea1bfc113b792cb167e0359d36f9250e3d21) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Examples: Fix top level buildFabian Kosmale2021-09-071-0/+1
| | | | | | | | | | | | | Examples using the "shared" pattern need to be recorded in the list in examples/quick/CMakeLists.txt, so that we do the necessary AUTOMOC handling for them in a top level build. For details, see the commit which introduced that list. Amends 34bc389543c37b8439c9c0b48f471649b6529868. Pick-to: 6.2 Change-Id: I6945b0c8445fe436da259dd240342e1c3b5cbf26 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io>
* Fix layouts example to use a QML moduleOliver Eftevaag2021-09-062-28/+17
| | | | | | | | Changing the CMakeLists.txt file to use qt_add_qml_module(). Pick-to: 6.2 Change-Id: Icafe9359494136af6d5f3befaa9e767ab12deb30 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix positioners example to use a QML moduleOliver Eftevaag2021-09-064-61/+28
| | | | | | | | | | | | | This fix changes the CMakeLists.txt file to use qt_add_qml_module(). It also updates copyright headers and changes import statements to remove version numbers. This causes the example to use qt quick controls 2, rather than qt quick controls 1, which is obsolete, and should no longer be used by any of our examples. Pick-to: 6.2 Change-Id: I1e40990b3a184c73b67a2ab04b4ec555774b8a1b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix righttoleft example to use a QML moduleOliver Eftevaag2021-09-065-62/+29
| | | | | | | | | | Updated CMakeLists.txt to use qt_add_qml_module(). Copyright headers and import statements have also been updated. Pick-to: 6.2 Change-Id: I8093d186f433293e63c6330def579f5589a938e6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Clean up the painteditem exampleUlf Hermann2021-09-0614-83/+150
| | | | | | | | | | | | The way it was before it was unusable. Move the files that belong to the TextBalloon module into their own directory, and add a wrapper application that loads textballoons.qml with the right parameters to actually find the TextBalloon module. Make sure that the qmldir file is copied to the output directory. Pick-to: 6.2 Change-Id: Ie7407a425a0a95a46de6486f9a28fd1aee07de9f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix delegatechooser example to use QML modulesUlf Hermann2021-09-064-57/+22
| | | | | | | | | | We need to rephrase the image source selection due to ListElement only accepting literals. We can't just poke into the qrc file system of the "shared" module without importing it. Pick-to: 6.2 Change-Id: I54d3fa4daf304afc9a0a55ab8b590d9c5ad20aa2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix the canvas example to use a QML moduleUlf Hermann2021-09-042-55/+27
| | | | | | Pick-to: 6.2 Change-Id: I84445909adafbd2cf0f5654fa78a005ed243536f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix animation example to use a QML moduleUlf Hermann2021-09-043-61/+35
| | | | | | Pick-to: 6.2 Change-Id: Ic53194b43eb651438d3f89bbb5dfbb97aff8b606 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Update text example to use QML modulesUlf Hermann2021-09-043-63/+35
| | | | | | Pick-to: 6.2 Change-Id: If1c8455aa823eb432f10586bdb31a65166ed915d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix threading example to use QML modulesUlf Hermann2021-09-043-47/+20
| | | | | | Pick-to: 6.2 Change-Id: I973244a0546e668ba8c65e573747e08f60a506c0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix ImageElements example to use a QML moduleOliver Eftevaag2021-09-0327-116/+81
| | | | | | | | | | | Removed the 'content' directory, and placed all images into a 'pics' directory. CMakeLists.txt is now also using qt_add_qml_module() Pick-to: 6.2 Change-Id: I673b7adea1832f304003f95e171118b0822b3c83 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Install the "shared" example module into macOS bundlesUlf Hermann2021-09-037-0/+40
| | | | | | | | | | | | | | | If we build an application bundle we cannot rely on the relative path between the application's and the shared module's output directories. This is somewhat ugly, but as we don't have a comprehensive solution for building application bundles, yet, it's the best we can do right now. In order for the shared bundle to be loaded from the PlugIns directory, we need to add the PlugIns directory to the import path on macOS. Pick-to: 6.2 Change-Id: I5b952420b4bb60af74886a140fa2c6a263d2f730 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix top level builds where AUTOMOC_EXECUTABLE was unset on some targetsCraig Scott2021-09-031-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The qt_example_build_end() command tries to recursively find all build system targets by descending into all source directories. Some sets of examples re-use the same source directory multiple times with different build directories, but this hides all but one of those re-used source directories from the recursive search. This resulted in some targets being missed, which in turn prevented qt_autogen_tools() from being called on them. In top level builds, this meant AUTOMOC_EXECUTABLE wasn't set, so CMake tried to verify the moc it wanted to use, which doesn't exist for the first configure of a top level build, resulting in a fatal error. Since we can't find all targets reliably with a recursive search, manually handle the ones that could be missed. There was a similar problem with qt_autogen_tools() not being called for a target created to compile a doc snippet. The error message is the same as the case above, the cause is again AUTOMOC_EXECUTABLE not being set, but for a different reason. Apply the same fix and call it manually, which should have been the case originally. Fixes: QTBUG-96118 Fixes: QTBUG-96159 Pick-to: 6.2 Change-Id: I079c696cf74f77d7caa2c59e6263d3fb1c55d20e Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Clean up flipable exampleOliver Eftevaag2021-09-038-14/+62
| | | | | | | | | | | | | | | Turning the project structure to be inline with Ulf's ideas. Such as using qt_add_qml_module(). Previously the path to 5_heart.png and 9_club.png were broken. This patch updates the path in the qml file, in order to make sure that the resource is actually loaded. It also adds a CMakeLists.txt, since it didn't already have one. Pick-to: 6.2 Change-Id: I4b2ffbfcfff7d2d63d7aab9fd7b40f77c1a1073c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix localstorage example to use a QML moduleOliver Eftevaag2021-09-0311-72/+56
| | | | | | | | | | Removing the directory 'localstorage' that is inside the top-level 'localstorage' directory, and moving the content one level up in the file hierarchy. Pick-to: 6.2 Change-Id: I97cf1ff92be9860d9a92bce66c88af927618e2b0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Fix documentation warnings in qtdeclarativeTopi Reinio2021-09-031-1/+1
| | | | | | | | | | | | | | | | | | * QtLabsPlatform has its own documentation project, but its source directory was pulled into QtQuick docs, causing duplicate generation and warnings. * Fix \snippet paths for files that were renamed/moved around. * Clean up .qdocconf files, use the {,} syntax to set identical values for multiple variables. * Fix incorrect \sa link. Pick-to: 6.2 Fixes: QTBUG-96125 Change-Id: I4c83787ac23a5b40019c74d46ee87c968a8d4907 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Disable quick examples currently breaking top level buildsCraig Scott2021-09-011-3/+3
| | | | | | | | | | | | | The add_subdirectory("../shared" "shared") pattern used by these examples seems to somehow trigger an AUTOMOC-related generation error. The cause is not currently known, so this change temporarily disables those tests until a proper fix can be found. Task-number: QTBUG-96159 Change-Id: I2525b77d0a25c3e3191ae2956857acabc0aedbf5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit d83c303b95e83895740d7b93262af7ba125edbcb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rename shapes example qml files according to what they demonstrateShawn Rutledge2021-09-0119-48/+48
| | | | | | | | | | | | The order they are shown in the grid is not important; but users should be able to run any of these qml files directly without building the example, and appropriate names make the "right one" easier to find. Task-number: QTBUG-95739 Pick-to: 6.2 Change-Id: I9751b52ce80bc08e12919ca3396c9d428d700a04 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix dialcontrol example to use a QML moduleUlf Hermann2021-09-0111-32/+26
| | | | | | | | | | | Also move the QML files out of the "content" subdirectory in order to avoid the directory import. Pick-to: 6.2 Change-Id: I84a1f5ef1a45e5098ec3213c6fbce06346f3606a Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Clean up shapes exampleUlf Hermann2021-09-0126-182/+61
| | | | | | | | | | | | Drop the confusing alias mangling on all the QML files. Instead move them into the base "shapes" directory. Also, use a QML module in CMake and use the "shared" module as intended. Pick-to: 6.2 Change-Id: I6a8fc3f2b2f86f58a54e188cf83ec7e2d4e8f468 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix ExternalDragAndDrop example to use qt_add_qml_module()Oliver Eftevaag2021-08-311-18/+13
| | | | | | Pick-to: 6.2 Change-Id: Ic368ce6e36ee41aff519a3ae106d18670c05bb54 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Convert dynamicview tutorial to use QML modulesUlf Hermann2021-08-3114-8/+203
| | | | | | Pick-to: 6.2 Change-Id: I98069eea1bd4492aba661e4672ffe297f0dcc4c8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix shadereffects example to use a QML moduleUlf Hermann2021-08-311-17/+13
| | | | | | | | Pick-to: 6.2 Change-Id: I3787fdfebfa1e376c2891f16f3fcf4f29f0e26d4 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Remove .prev_CMakeLists.txtUlf Hermann2021-08-315-156/+0
| | | | | | | | We don't need to use pro2cmake anymore here. Pick-to: 6.2 Change-Id: Iba8bac70c1fe31e56bf9680608913cc2c336f946 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* DynamicView4 tutorial: add forgotten file to qrcOliver Eftevaag2021-08-311-0/+1
| | | | | | | | | | | The FileSelector.qml component for some reason were never added to the qrc file, which meant that it didn't exist in the eyes of qmake. It should now be possible to run the program. Pick-to: 6.2 Change-Id: Iaab67860123e926456c99b775449648f5d8e7c3c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix samegame example to use QML modulesUlf Hermann2021-08-3147-60/+273
| | | | | | | | | | | | | | | | | | | | | In this case it really makes no sense to use a shared directory because we want to show the progressive changes between the different versions. It's actually important to note that we're adding the pictures one by one. Therefore, the shared directory is dissolved and the pictures added duplicated into the respective versions of samegame. Furthermore, moving the code into a "content" directory is a bad idea because it complicates the import logic. We don't want to make the "content" directory its own QML module. We might move samegame.qml into the "content" directory, too, and apply some path wrangling to make it work, but it's really not worth it here. Pick-to: 6.2 Change-Id: Ifc45f48832596377c21bc6ef55e918ef487bc94e Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Migrate to fixed add_shaders prefix handlingLaszlo Agocs2021-08-303-3/+3
| | | | | Change-Id: I6c5b0680d32bc3650983c64cc4583f790774da88 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add qsTr() around 2 strings in imageelements exampleOliver Eftevaag2021-08-303-5/+5
| | | | | | | Making some strings translatable Change-Id: I7a088e9e9966996ee20ab8bee29cf17c060120d7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix touchinteraction example to use QML modulesUlf Hermann2021-08-3024-85/+55
| | | | | | | | | Remove the "content" subdirectories. They just add noise. Pick-to: 6.2 Change-Id: Iae6bf7d91b6804294673be8966e30b11caae0654 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update views example to use modulesUlf Hermann2021-08-306-89/+66
| | | | | | | | | | The qmake and qmlproject files are adapted to use the "shared" module, too. Pick-to: 6.2 Change-Id: I5fc4895416357ba202528b155581b1b5a880a68d Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix the qtquick/window example to use QML modulesUlf Hermann2021-08-307-52/+143
| | | | | | | | | | | | The shared code becomes its own module. Due to the ${PROJECT_NAME} trick it should be possible to include it multiple times, in different examples. Pick-to: 6.2 Change-Id: I78cc3211f67fae9a713320fae4041898e6a397ed Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Fix coding styleOliver Eftevaag2021-08-301-5/+5
| | | | | | Pick-to: 6.2 Change-Id: Icfcdcb306dbeb750c8ebad44b431c5364ef63c44 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>