summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* examples: port drag and drop example to new connection styleSamuel Gaist2023-02-261-3/+3
| | | | | | Task-number: QTBUG-111463 Change-Id: I02c453682cf06c150ff91f4c923af73966c11ca0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* examples: port richtext example to new connection styleSamuel Gaist2023-02-261-2/+2
| | | | | | Task-number: QTBUG-111463 Change-Id: Idc66a5a257c44ea5d1f9304978432b74c1039173 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-2313-13/+13
| | | | | | | Task-number: QTBUG-105718 Change-Id: Ica4da2b513a5c8f58b9f955e5cdabb92bbf5f48a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* SvgViewer example: fix deprecation warningsIvan Solovev2022-07-152-4/+4
| | | | | | | | | * Use std::unique_ptr instead of QScopedPointer * Use operator| instead of operator+ for constructing a QKeyCombination Pick-to: 6.4 6.3 6.2 Change-Id: Ide03258f8078f68f758ed92812daea8665f548ba Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-0713-0/+39
| | | | | | | | | | | | | 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: Ic3d0ab6a3e3a32ce0bab59074242c0e17c6965dd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-1345-2137/+90
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ie5a75414af5fda27f5b5f527f3543b088b674677 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Improve examples CMakeLists.txtKai Köhne2022-03-1013-107/+33
| | | | | | | | | | | | | | | | | - Remove "# generated from xyz.pro" comment from 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: Ifce5c3ebdc328269b491fa1e1e79e4cd5ef1f4db Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Replace 0 with nullptrZhang Hao2021-10-151-2/+2
| | | | | | | | We know that c++11 uses nullptr to replace 0, so we replace 0 with nullptr in the project. Change-Id: I81eb8c13339bf235ca5eab719526680e31fa26ed Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* Raise cmake_minimum_required to VERSION 3.16 in examplesJoerg Bornemann2021-08-178-8/+8
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-95636 Change-Id: I3c417c924890f4f4a3a3fd4456d5fa66fea33905 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Switch examples to build as isolated sub-buildsAlexandru Croitor2021-06-155-9/+9
| | | | | | | Task-number: QTBUG-90820 Change-Id: I6888ccc98330588218c909f2e208e000a0441651 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix build of svggenerator exampleAlexandru Croitor2021-03-222-2/+4
| | | | | | | | | | | | | | | | | CMake's AUTOUIC behavior is slightly different from qmake's .ui file handling. The file including ui_foo.h can't directly include it if the ui file is in a subfolder. Adjust AUTOUIC search paths by setting the AUTOUIC_SEARCH_PATHS target property. Amends c2ccbdd1eb5a367c2778caed091b25dddc895129 Pick-to: 6.1 Fixes: QTBUG-91893 Task-number: QTBUG-77812 Change-Id: I01e8943d0a3bb9dedd7af3ef96add23f30b493f8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add qtsvg examples to cmakeAllan Sandfeld Jensen2021-03-1018-7/+574
| | | | | | | | | | Note svggenerator is skipped because something is wrong with its generated cmake files that I didn't recognize. Pick-to: 6.1 Change-Id: I406fa45916148a10ae7b06e8853205d33011757f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* delayedencoding example: adapt to QMimeType changeFabian Kosmale2020-09-232-2/+2
| | | | | | Fixes: QTBUG-86853 Change-Id: Idfd6aef8dae89163c5941499c968acd4948a4783 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Fix linking to Qt Designer ManualTopi Reinio2020-09-021-1/+1
| | | | | | Pick-to: 5.15 Change-Id: I9e431a046edb55f060f25ed9fa8aab176647edf4 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* fluidlauncher: remove QStringRef header inclusionFabian Kosmale2020-08-241-1/+0
| | | | | Change-Id: I535fae5973a410961c8fc79b9d962863d979346c Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* weatherinfo: fix compilation after QXmlStreamReader QStringView changeFabian Kosmale2020-08-241-10/+10
| | | | | Change-Id: I3115c0a6abaf2748c3bfc01655bf2eb1d0d9cd50 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* fluidlauncher: fix compilation after QXmlStreamReader QStringView changeFabian Kosmale2020-08-241-7/+7
| | | | | Change-Id: I20e84b2c944c91fa9eac36f72d1768cac3b07b51 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QTimeLine's easingCurve in preference to its curveShapeEdward Welbourne2020-07-161-1/+1
| | | | | | | | | The curveShape shall be deprecated and is equivalent to setting the easingCurve. Pick-to: 5.15 Change-Id: I96fb873680c37cb5f79378dcf33075636f0de82a Reviewed-by: hjk <hjk@qt.io>
* Port QtSvg from QStringRef to QStringViewKarsten Heimrich2020-07-021-8/+8
| | | | | | | Task-number: QTBUG-84319 Change-Id: I6358030d1d7e0e023453edea10da535707320ea4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-231-1/+1
| | | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I24cc0f6735ddd8fb2444bc3bb4e7b202e8bbb43f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-092-10/+10
| | | | | | | | | | | | | | | | | | | | 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/qtsvg $ find . -name "*.clazy.yaml" $ clang-apply-replacements . Task-number: QTBUG-20885 Task-number: QTBUG-84775 Change-Id: I33c38042d0489134567045c759e125c7f540ce7d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-081-6/+6
| | | | | | Task-number: QTBUG-84469 Change-Id: I8c3e80c77422abeb23fff747bf4ca479ff0d35b3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move QSvgWidget and QGraphicsSvgItem into separate moduleVolker Hilsheimer2020-05-295-4/+5
| | | | | | | | Long live QtSvgWidgets. This makes QtSvg independent of QtWidgets. Fixes: QTBUG-41884 Change-Id: I421d27d35b651ee8cdf1a5280d5594b82359ddab Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* svggenerator example: Remove custom slot definitionsFriedemann Kleint2020-05-052-72/+4
| | | | | | | | | | They are a rather obscure feature of Qt Designer and should not be used in examples. Remove custom slot definitions of the form class and move the connections to C++. Pick-to: 5.15 Change-Id: Ice068ecf269efaf5060d2457096417c7d0df0346 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Merge remote-tracking branch 'qt/5.15' into devPaul Olav Tvete2020-03-121-0/+1
|\ | | | | | | Change-Id: I384c7ee8291b628eba79b97b2b612495ac657490
| * Fix build with recent qtbasev5.15.0-beta2Allan Sandfeld Jensen2020-03-101-0/+1
| | | | | | | | | | | | | | | | We need to include QPainterPath when using it. Change-Id: I9f84aa3185de05d410e8355a5c4f6a556dbac5c0 Fixes: QTBUG-82788 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-0217-1632/+2
|\ \ | |/ | | | | | | | | | | Conflicts: examples/svg/svg.pro Change-Id: I186ffe58bd314b505060b2ef5b090503d5a59618
| * Revert "Replace call to deprecated QNetworkReply::error method"Timur Pocheptsov2020-02-241-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit 88f30c3f5be38fb9cb6886a683a71ae792e61c61. Reason for revert: it was decided to use errorOccured as the name for the signal, thus we reverting this change. Change-Id: Ibc147869317e7d68162e677fcac08707d730ddb5 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * Remove bearercloud examplev5.15.0-beta1Mårten Nordheim2020-02-1916-1631/+1
| | | | | | | | | | | | | | Bearer management is going away so this example cannot stay as it is Change-Id: I4d44158c95afc90f647741b99cf64ea18588cfb1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | svgviewer: Add a dependency on Qt OpenGLWidgetsJohan Klokkhammer Helsing2020-02-241-1/+1
| | | | | | | | | | | | | | | | | | OpenGLWidgets was moved to a new module and this fixes the build issues. Task-number: QTBUG-74409 Change-Id: I047e21f0ba04a8949c06c283e8d26da2e0293f58 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-211-1/+1
|\ \ | |/ | | | | Change-Id: I589e15e78ac980f326566e7543e0378c24e4088a
| * Replace call to deprecated QNetworkReply::error methodFabian Kosmale2020-01-161-1/+1
| | | | | | | | | | | | Change-Id: Id95d1f09fa533e2993f446da965fa7cda81c473a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Update dependencies on 'dev' in qt/qtsvgQt Submodule Update Bot2019-12-1711-736/+2
|/ | | | | | | | | | | Remove the framebufferobject example as it still relied on the now removed QGL* classes. Ported the svgviewer example over to use QOpenGLWidget. Change-Id: Idfb1ea7bcb0c8ba7f3f97b4b2d26603f4f7ec96a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Remove usages of deprecated APIs of QDesktopWidgetSona Kurazyan2019-09-112-3/+3
| | | | | | | | | Replaced: QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry() Task-number: QTBUG-76491 Change-Id: Icfda5c8f046652f30eb123be3a377da2e8ecc11c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Replace the deprecated QWheelEvent::delta() -> QWheelEvent::angleDelta()Sona Kurazyan2019-08-262-2/+2
| | | | | | | | | | Replaced the deprecated QWheelEvent::delta() with the vertical component of angle delta, assuming that it's acceptable to have a single-dimension mouse wheel in the example code. Task-number: QTBUG-76491 Change-Id: I404d0bf80e22ef4ec3a11aa962f0389c150081cb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Convert uses of QTime as a timer to QElapsedTimerEdward Welbourne2019-06-131-3/+3
| | | | | | | | | | | | One was an easy replacement, the other changes its reference time, which isn't supported by QElapsedTimer. However, it was easy enough to reimplement in terms of QDateTime::currentMSecsSinceEpoch(); and, as it was previously using QTime as timer, this is presumably good enough (although a proper monotonic timer would be better). Change-Id: I90f8e08635e7d2bc364755efd93fce008b6a62c0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QtSvg: remove deprecated functions and enumerationsChristian Ehrlicher2019-05-277-24/+9
| | | | | | | | Replace QPainter::HighQualityAntialiasing with Antialiasing and remove defines needed for Qt4. Change-Id: I866decad7d9c10da15e5b0e0bd79033d574f6a08 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix deprecation warningsv5.13.0-alpha1Friedemann Kleint2019-02-052-4/+4
| | | | | | | | | | | | | | | | | Fix: qsvgiconengine.cpp: In member function ‘virtual QPixmap QSvgIconEngine::pixmap(const QSize&, QIcon::Mode, QIcon::State)’: qsvgiconengine.cpp:200:38: warning: ‘static bool QPixmapCache::find(const QString&, QPixmap&)’ is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations] tst_qsvgrenderer.cpp:479:54: warning: ‘const QMatrix& QPainter::worldMatrix() const’ is deprecated: Use worldTransform() instead [-Wdeprecated-declarations] ... glwidget.cpp: In member function ‘void GLWidget::draw()’: glwidget.cpp:231:41: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] glwidget.cpp:232:41: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] fluidlauncher.cpp:71:65: warning: ‘const QRect QDesktopWidget::screenGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations] Change-Id: Iae20d950c3118d05f91202c8020dbd81fa73b48f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* richtext example: Remove wince block as the platform is not supportedOliver Wolff2018-11-221-5/+0
| | | | | Change-Id: Id98f7cc5fb46bfc4ed57a78c86096b3d191967f5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* BearerCloud example: Fix warning about hiding a virtual functionv5.12.0-beta4v5.12.0-beta3v5.12.0-beta2v5.12.0-beta1Friedemann Kleint2018-09-203-3/+3
| | | | | | | | | Rename Cloud::advance() to Cloud::advanceAnimation() to avoid a clash with void QGraphicsItem::advance(int). Task-number: QTBUG-60653 Change-Id: Iabcc0eab6de3090c5dcc0952f350b060ae542f02 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* SVG viewer example: Improve zoom facilityv5.11.0-beta3v5.11.0-beta2Friedemann Kleint2018-03-014-2/+67
| | | | | | | | | | | Add a label displaying the current zoom with a tooltip. Add menu actions for ZoomIn/ZoomOut and Reset. Task-number: QTBUG-60653 Change-Id: I7569427345737024b7a3191677e54c83673bb40e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Update to new QRandomGenerator APIv5.10.0-beta4Thiago Macieira2017-11-031-1/+1
| | | | | Change-Id: I69f37f9304f24709a823fffd14e676c097712329 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-3036-114/+444
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I8b9a5a395dbd6659f7806eeebdd665c760a71ec1
| * Fix outdated FDL license headerv5.9.35.9.3Kai Koehne2017-10-173-15/+15
| | | | | | | | | | Change-Id: I2a2501a61107717b8e1adacad064664cf54cd972 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| * Fix outdated BSD license headerKai Koehne2017-10-1733-99/+429
| | | | | | | | | | Change-Id: I3917e7ab180b49c77bff0d071eca10f8bc7f33c7 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Replace a float[128][128] with a single floatEdward Welbourne2017-07-141-3/+4
| | | | | | | | | | | | | | | | | | The whole array was incremented in lock-step so that, when values were being read, they all had the same value; so a single float can hold that value, instead of 16k copies of it. Change-Id: Ib1bd31513eb7fe9e500f16f37a1c3653426c896c Reviewed-by: hjk <hjk@qt.io>
* | Be (somewhat more) consistent about the value of piEdward Welbourne2017-07-142-26/+14
| | | | | | | | | | | | | | | | | | Use M_PI (from qmath.h) rather than hand-rolled values. Simplify some untidy arithmetic, eliminating some duplication and inefficiency. Task-number: QTBUG-58083 Change-Id: I6ec5a91cae30693e0c17f80e2be235faa1edcdb7 Reviewed-by: hjk <hjk@qt.io>
* | Use QRandomGenerator instead of q?randThiago Macieira2017-06-301-3/+2
|/ | | | | Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix building of examples without bearermanagenementUlf Hermann2017-03-072-2/+2
| | | | | | | | The qfeatures mechanism doesn't exist anymore. Use qtConfig(...) instead. Change-Id: I8285d7f92d87c07d316a47ef96178d9024aac40f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Use the "process" feature to determine if QProcess is availableUlf Hermann2017-03-061-1/+1
| | | | | | | There are more platforms where it isn't. Change-Id: I7be556fb4ed5327205ce734f1edca934ce292c00 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>