Commit Graph

45 Commits

Author SHA1 Message Date
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
Joerg Bornemann 1917a868d9 Use fixed qt_add_resource BASE argument
Pick-to: 6.1
Task-number: QTBUG-86726
Change-Id: If6e1033642d98ccd40daeb57a453c0e5bc2985da
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-21 00:21:26 +02:00
Oliver Eftevaag 1d3cdac6e4 Update canvas example to use QtQuickControls2
The QtQuick examples should ideally have a more native look and feel.
Making them use controls from QtQuickControl will cause them to adapt to
the desktop style.

This patch replaces the previous Sliders from the 'shared' directory,
with Sliders from QtQuickControls2

Task-number: QTBUG-90880
Change-Id: I90521abf7059950521bc3d1a54994d2cca07259d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2021-03-10 17:53:22 +01: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
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
Leander Beernaert 1d333d3375 Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I0c5b939c70bdb91ccdf7068784308416dcaa5736
2020-01-16 16:25:06 +01:00
Ulf Hermann 74377894ec examples: Drop bogus reference
Canvas doesn't have an "alpha" property.

Change-Id: I7cedff568ec062d7586b6b7333e32a8e52d2e8a9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-11-18 15:31:31 +01:00
Leander Beernaert 9e633bbda7 Regenerate Examples
Change-Id: I2fbfb44bbb6d667e022bffb480feaf74ff0d0a5e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-14 09:09:55 +00:00
Leander Beernaert bf58a1cc04 Update Examples with lowercase qt6_add_resources()
Re-run pro2cmake on all exampls.

Change-Id: Iafd1092beff023b407a8f29c2a5b651f2e534b75
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-09-20 08:38:06 +00:00
Leander Beernaert b938edcfb3 Convert Examples
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>
2019-08-23 13:51:06 +00:00
Kai Koehne 341a04377b Fix outdated FDL license header
Change-Id: I76dccf547de40b5e72fd7abaa062fa96cb2c118a
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-10-17 11:18:21 +00:00
Kai Koehne ea6cd0de3c Fix outdated BSD license header
Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-10-17 11:18:11 +00:00
Ionut Alexandrescu 3e537dd3dc Fix smile qml example
The mouth line was not closed and the right eye line was too big

Change-Id: Ifea4a8dbdd38df3c83cd80491210585fcbb76d3c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-21 12:30:17 +00:00
Mitch Curtis 7a0dba0225 Fix typo in squircle example.
Change-Id: I352de9cdd6842f11395982212889b6f0ed3ecc70
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-07-28 13:15:59 +00:00
Jani Heikkinen 20c207815a Fixed license headers
Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
2015-02-17 13:33:18 +00:00
Jani Heikkinen c5796292ad Update copyright headers
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>
2015-02-12 10:28:11 +00:00
Nico Vertriest cce0e1f9c2 Doc: apply title case to all section1 titles
Task-number: QTBUG-41250
Change-Id: I303d989992c9685f73baae50c64accf71b43549f
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-24 12:16:44 +02:00
Jerome Pasion 5f99a6388a Doc: Updated "Qt Quick Examples" pages.
-added instructions about running the example (using \include)
-used the example names as sections in the collection pages
-general editing and documentation polishing
-updated copyright information

Change-Id: I044f29fcc1921a541040505d5821acb06dc4cb35
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-06-05 12:02:01 +02:00
Mitch Curtis c5aaba627e Set font correctly in canvas example.
This fixes the following warning:

Context2D: Missing or misplaced font family in font string (it must come after the font size).

Task-number: QTBUG-38103
Change-Id: I0902e6e095fb76cdc8619229dccf2601007c3216
Reviewed-by: Jeff Tranter <jtranter@ics.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-04-08 15:45:53 +02:00
Sze Howe Koh 0d4512c8bd Doc: Fix some broken snippet paths
Change-Id: Ib79bfbea402b86e26a503de47383522317ca906b
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-06 16:35:28 +02:00
Frederik Gladhorn 98023c7eba Canvas: Do not apply transform to text twice
The path already has the transform,
no need to apply it a second time manually.

Task-number: QTBUG-30501

Change-Id: Iedcb2e2f85a1f9eeac8e6264e00536c43bf16ddb
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-03 16:27:49 +02:00
Frederik Gladhorn acc94a42cd Merge remote-tracking branch 'origin/release' into stable
Conflicts:
	examples/qml/xmlhttprequest/doc/src/xmlhttprequest.qdoc
	examples/quick/accessibility/doc/src/accessibility.qdoc
	examples/quick/animation/doc/src/animation.qdoc
	examples/quick/canvas/doc/src/canvas.qdoc
	examples/quick/draganddrop/doc/src/draganddrop.qdoc
	examples/quick/imageelements/doc/src/imageelements.qdoc
	examples/quick/keyinteraction/doc/src/keyinteraction.qdoc
	examples/quick/localstorage/doc/src/localstorage.qdoc
	examples/quick/mousearea/doc/src/mousearea.qdoc
	examples/quick/particles/affectors/doc/src/affectors.qdoc
	examples/quick/particles/customparticle/doc/src/customparticle.qdoc
	examples/quick/particles/emitters/doc/src/emitters.qdoc
	examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc
	examples/quick/particles/system/doc/src/system.qdoc
	examples/quick/positioners/doc/src/positioners.qdoc
	examples/quick/righttoleft/doc/src/righttoleft.qdoc
	examples/quick/scenegraph/customgeometry/doc/src/customgeometry.qdoc
	examples/quick/scenegraph/openglunderqml/doc/src/openglunderqml.qdoc
	examples/quick/scenegraph/simplematerial/doc/src/simplematerial.qdoc
	examples/quick/threading/doc/src/threading.qdoc
	examples/quick/touchinteraction/doc/src/touchinteraction.qdoc
	examples/quick/views/doc/src/views.qdoc

Change-Id: Idf7bb76c82acacf86b19a9f4633c3cbf4ae1a9a0
2013-04-03 16:16:08 +02:00
Sze Howe Koh 0497633507 Doc: Fix some titles and links
Make page titles follow the conventions at
http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation.

Make class/type list titles follow the "<Qt Module> C++ Classes" and
"<Qt Module> QML Types" formats.

Links are updated accordingly, along with broken links found during this
sweep. Some inline links also have their surrounding text modified, to
improve flow.

Change-Id: I0ed7788caa250085d7ea0080a77d8a2655debf39
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-03-30 01:12:39 +01:00
Jerome Pasion 363385a549 Doc: Fixed some uses of terminolgies in qdoc files.
-"element" -> "type" or "object" (not in all cases where this change applies)
-some instances of QtQuick. It should be "Qt Quick".
-only in qdoc files. Examples and source code changes will be done later.

Task-number: QTBUG-30180
Change-Id: Ie587461a138e97606f761ad1e90909c91b479303
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-03-26 22:45:31 +01:00
Kai Koehne 1a23fbc59a Fix duplicate examples for qml/quick modules
Task-number: QTBUG-30233
Change-Id: Ic0a6d9112dbf8903d68f571e0ac853d89ff31ebe
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-03-21 10:48:16 +01:00
Jens Bache-Wiig f289fdc53e Various improvements to Canvas examples
I noticed these examples were rather "aestetically
challenged" and decided to make it a test case for our
WIP style guidelines.

- Use consistent margins (12 px)
- Use proposed color palettes
- Use proposed fonts and header styles

I created a new Slider graphic and moved this into
the shared folder as I think it is useful for other examples.

I removed a lot of unused files which seem to have been added
but never actually used.

I also found several bugs in our implementation, including
not scaling or rotation around the correct origin.

In many cases I simplified the examples, removing
variables/sliders where they did not add significantly
to the example itself.

Change-Id: Ie09da33deaf56a3ec45a2031b87a24a8602e994a
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-02-26 15:13:35 +01:00
Sergio Ahumada 83deab8d1b Update copyright year in Digia's license headers
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-10 19:52:37 +01:00
Kai Koehne a0fb0a5dd3 Use resource files for most examples
Make examples shadow-build-friendly by using resource
files instead of trying to derive the qml path from
applicationDirPath().

Change-Id: I669424554c772d9b261249b366247190f5fbd8b1
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2012-12-12 10:32:50 +01:00
Oswald Buddenhagen a6065d60f1 centralize and fixup example sources install targets
follow respective change in qtbase

Change-Id: I27502eb7ebea973e19ec5f7c3ec0e2338556f6e0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
2012-12-10 18:16:48 +01:00
Eskil Abrahamsen Blomfeldt 6daa13b55a Fix example lists for Qt Quick
Snippets are fixed, the extending-examples are moved from
QtDoc, groups are used to generate the lists and I've removed
some unrelated stuff from the list of Qt Quick examples.

Change-Id: I347b6fa8a29b1cede1164fa858488f34507e1a17
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2012-11-30 15:30:17 +01:00
Christian Kandeler aba67cc3f0 Fix installation of examples.
Enable examples to be built in the target tree. This entails installing
the project files and possibly other missing stuff.
Task-number: QTBUG-27977

Change-Id: I159fd8e3ebc7077e1d68e085c4947acc058ce594
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-22 14:10:05 +01:00
Eskil Abrahamsen Blomfeldt 5e975a3124 Merge branch 'newdocs'
Change-Id: Idd7a9837e4f6a1358edf9accdcdc3c71822f4c25
2012-11-20 10:19:32 +01:00
Thiago Macieira 2973dc4324 Install the Qt Quick 2 examples in the "qtquick" dir
Leave the "qtdeclarative" dir for Qt Quick 1, which is where it used
to be in Qt 4.

Change-Id: I44997771d77617564fc608c1aba95e3ada8f9a69
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
2012-11-09 13:33:19 +01:00
Venugopal Shivashankar 61d35829ee Doc: Moved all content in the doc directory.
- most images to the corresponding examples directory
- Fixed a few broken links to the examples and qdoc pages
- removed the obsolete and unused images and qdoc pages

Change-Id: I18f9551b42ec713b81e3f69694a2bd04b1ebf794
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2012-11-08 12:16:52 +01:00
Miikka Heikkinen cad818ae17 Add missing contents dir to installation of canvas example
Task-number: QTBUG-26995
Change-Id: Ib346c857f9e0bc97bb2e4365abddb6475c7142d4
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-10 18:48:36 +02:00
Iikka Eklund 46010aa7a2 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-09-23 08:22:24 +02:00
Jerome Pasion 5c88efc06d Examples: Moved example documentation.
-inline \example pages into separate .qdoc files
-fixed broken links to paths
-moved ui-components under examples/quick

Change-Id: I6e009b9213be3e1f4bed51bdbeb76a7a2142c80b
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-09-21 10:25:11 +02:00
Michael Brasser 3912bbacea Update usage of smooth and antialiasing.
Change-Id: Icc8b28bdd466389ed3f269f076f1bdb6e9abe3f2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-08-28 01:51:19 +02:00
Charles Yin 4236e7f7ee Refactor context2d thread logic
1. Use QQuickContext2DRenderThread for Threaded rendering
2. Make FBO target works with all render strategies
3. Remove some unnessary locks, call texture methods by invoking meta calls
4. Run existing tests with all render targets and strategies (except Cooperative)

Change-Id: I0db5c91d848b86bcc1536c30d7a5804b66a817f1
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-07-31 07:44:12 +02:00
Kent Hansen cf6926229f Don't use QtDeclarative compat module
Use QtQml instead.

Change-Id: If899ebc1e0b4ea86f0f8d4369fbd3eb5cbb2181c
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
2012-05-11 09:34:46 +02:00
Alan Alpert 0ac61552a4 Expound on canvas example documentation
Change-Id: I5bf82697dcbadaa9dc58e11ee22b2ab8c1a28852
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-04-26 04:53:08 +02:00
Alan Alpert 1025b77fe0 Tidy up examples documentation
Add missing doc images, move documentation into examples directory, and
update example doc references to the new locations (quick/qml instead of
declarative or qtquick).

Change-Id: I67a9302f2b451b8bf30f4ca6b625f54b240da429
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-03-28 05:49:28 +02:00
Charles Yin 6b8c356401 Refactor canvas examples by following the new example guidelines.
Change-Id: I1cc749ad11b8439239ba739f40e99b78af7351ab
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-03-14 01:31:08 +01:00
Matthew Vogt 0284817d6c Merge master <-> api_changes
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
2012-03-05 11:39:54 +10:00