summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* remotecontrolledcar example: Modernize the codeIevgenii Meshcheriakov2023-03-236-57/+27
| | | | | | | | | | Also remove unused crashed() signal. Task-number: QTBUG-111366 Pick-to: 6.5 Change-Id: Ia23552a6396c324c7591643afaa634879a2c185e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* mainwindow example: Fix implicit conversion from qsizetype warningsTor Arne Vestbø2023-03-232-3/+3
| | | | | | Pick-to: 6.5 Change-Id: Ifaeeb620420f43529bb9e3d533b4e1a2e20c68ca Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove loopback network exampleMårten Nordheim2023-03-239-283/+0
| | | | | | | | | | It doesn't showcase anything interesting that other examples don't already show off. Pick-to: 6.5 Change-Id: Ie95c3ddb3ff52b3beab54bd6fa75fb75ae5c7ba5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
* Clean up multicast examplesMårten Nordheim2023-03-237-6/+10
| | | | | | | | | They're small, not much to polish. Pick-to: 6.5 Change-Id: Iada573504de557ab18381370bb9760b1f60cc2e4 Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Move hellogles3 docs to where the rest of these files liveLaszlo Agocs2023-03-233-0/+2
| | | | | | | | | And expand the note in the openglwindow example to point to hellogles3 as well. Pick-to: 6.5 Change-Id: I2c0ee9b83fa59752d937c57eaf0194f0d0a8a7d9 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Remove erroneous widget dependency for hellogles3Laszlo Agocs2023-03-233-3/+9
| | | | | | Pick-to: 6.5 Change-Id: I42b476be28acd5b5c68f115bd98cf5c43cd8d97b Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Change paintedwindow example to be a manual testLaszlo Agocs2023-03-237-313/+1
| | | | | | Pick-to: 6.5 Change-Id: I25a0f491f824c43fc75ba6358518133ede09adcd Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Move hellowindow and qopenglwindow to be a manual testsLaszlo Agocs2023-03-2314-1028/+2
| | | | | | Pick-to: 6.5 Change-Id: I8d1517ee57df9b2dee0486f47562b0754e9dcbad Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Change computegles31 example to a manual testLaszlo Agocs2023-03-229-603/+0
| | | | | | Pick-to: 6.5 Change-Id: I652daf3ccbb921c5eb73b48586ee9616c7704b97 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Remove hellovulkanwindow exampleLaszlo Agocs2023-03-2211-273/+50
| | | | | | | | | | | | | The idea being that hellovulkantriangle demonstrates the same things. As a getting started tutorial hellovulkanwindow is the ideal example, but then again QVulkanWindow is not something we want to promote much in Qt 6. Some of the docs are moved to hellovulkantriangle. Pick-to: 6.5 Change-Id: Icbfff70b4a4c7e4c0863a937f3c16038c0b03fbe Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Move hellovulkantexture example to manual testLaszlo Agocs2023-03-2215-1005/+1
| | | | | | | | | | Because it is the least documented one, and compared to the other Vulkan examples it does not add anything new, it just dives deeper into Vulkan. Pick-to: 6.5 Change-Id: Iecf3e04625fba256ea8134da57f54498ee2010db Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Move rsslisting example into corelibe/serializationØystein Heskestad2023-03-219-8/+10
| | | | | | | | | | The implementation of the stream-based XML parser resides in coreslib/serialization. Moving the rsslisting example there. Task-number: QTBUG-110647 Pick-to: 6.5 Change-Id: I862909e767301250750b6ee0d8ac7e20d6bad2b1 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Remove libQt6Xml dependency in rsslisting exampleØystein Heskestad2023-03-212-3/+2
| | | | | | | | | This example does not use libQt6Xml, remove dependency. Task-number: QTBUG-110647 Pick-to: 6.5 6.2 Change-Id: Ida8c4df0e274cbc2e0a5f7151f18693d7e1c2401 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Remove libQt6Xml dependency in streambookmarks exampleØystein Heskestad2023-03-212-3/+2
| | | | | | | | | This example does not use libQt6Xml, remove dependency. Task-number: QTBUG-110647 Pick-to: 6.5 6.2 Change-Id: I40e5976121ddc97a78b540d17784b3357b87adf7 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Doc: Fix wording in the Simple Style Plugin documentationJoerg Bornemann2023-03-211-5/+5
| | | | | | | | | | | When talking about QMake project files we now refer to ".pro files" instead of "profiles". Pick-to: 6.5 Change-Id: Ia8d20a6a03b9076e97f45da272bb3f883febc796 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Example: rename progressdialog to primecounter and modernize itDennis Oberst2023-03-2114-85/+494
| | | | | | | | | | | | | The previous example finished way too quickly and provided no real value in regards to API understanding. Previously, QtConcurrent::map was used, which was also used in other examples. We are now using QtConcurrent::filterReduce to demonstrate other functionality. Task-number: QTBUG-111165 Pick-to: 6.5 6.5.0 Change-Id: Ibd6eb119d0711cddfe8b211d460e9d67d6ce95c3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Example: update wordcount exampleDennis Oberst2023-03-202-63/+126
| | | | | | | | | | | | | | Added a QFileDialog to let the user select a path. Before, the path was statically assigned with "../../" , which is not optimal. I also modified the findFiles function to check for text files in general and not only *.cpp and *.h files. Lastly the result of the word counting is now displayed on the console, as I think this is an informative output from this example. Task-number: QTBUG-111165 Pick-to: 6.5 6.5.0 Change-Id: Ie27c6acb4f79a78e3bef141edb92de08901fde71 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Rework documentation of cbordump exampleEdward Welbourne2023-03-201-23/+24
| | | | | | | | | | | | | | | Focus the phrasing on what it teaches - how to use the stream reader - more than the example application of that, displaying it. Update docs: * Changed name to conform to modern guidelines. * Consistently mark \c cbodrump as code. * Fix mentions of CborDumper and CborTagDescription to match code. * Say how the tagDescriptions table is used. Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: Ic12e77cf34caadc9f60527e886f94c76cb8cfeaf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use local names to make some numeric_limits references more readableEdward Welbourne2023-03-201-5/+7
| | | | | | | | Pick-to: 6.5 Task-number: QTBUG-111228 Change-Id: I220f5c2f13c8f01278be806c8e8d6a3a1be8e986 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* remotecontrolledcar example: Move car.xml to common directoryIevgenii Meshcheriakov2023-03-206-15/+4
| | | | | | | | | It is shared between car and controller executables. Task-number: QTBUG-111366 Pick-to: 6.5 Change-Id: I5f98a09664671c55bfad68ebf88c9f0c734511fa Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* remotecontrolledcar example: Move executables into single example projectIevgenii Meshcheriakov2023-03-204-17/+13
| | | | | | | | | This allows building of all the example executables at once. Task-number: QTBUG-111366 Pick-to: 6.5 Change-Id: I1fa372ec9725bfeb1f123305aa7324b7820eb593 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* dbus examples: Update screenshotsIevgenii Meshcheriakov2023-03-146-2/+2
| | | | | | | | | Use WEBP format to reduce the file size. Task-number: QTBUG-111366 Pick-to: 6.5 Change-Id: I14ff15010e7ac7e1b375eeafaa1c153b0fdd95e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Imagescaling example: fix memory leaksIvan Solovev2023-03-131-1/+2
| | | | | | | | | | | | | * The DownloadDialog was never destroyed properly. Pass 'this' to its constructor to fix it. * When re-creating an image grid layout, properly clean up old image labels in Images::initLayout() Task-number: QTBUG-103514 Pick-to: 6.5 6.5.0 Change-Id: Ief52774002632d4ad3a6cca85bb0c0aa1a1d4bc0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Doc: Remove broken link to Anchor Layout ExampleAndreas Eliasson2023-03-131-2/+0
| | | | | | | | | This example was moved to manual tests in 6.5, which broke the link. Now that it's in manual tests, I guess we can stop promoting it. Pick-to: 6.5 6.5.0 Change-Id: I1aa4a7de5123e96bf9ff56eeae49104acdce9645 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Update the bindable properties exampleJames DeLisle2023-03-099-47/+43
| | | | | | | | | | | | - Fix the number of months in each duration - Move the user Country enum to use QLocale::Territory - Properly calculate the cost per month to match the UI label - Use QLocale to format the price display text - Fix some misspellings and grammar in the doc Pick-to: 6.2 6.5 Change-Id: I78a64f344073070cd94d5cb4a8a4c7c13afa337f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Example: remove runfunction exampleDennis Oberst2023-03-096-81/+0
| | | | | | | | | | | | | | This example shows how to use QtConcurrent::run by calling a global function and printing the thread ID. As the documentation already explains the functionality very well, I don't think this example is necessary. https://doc.qt.io/qt-6/qtconcurrentrun.html Task-number: QTBUG-111165 Pick-to: 6.5 6.5.0 Change-Id: I42a718cdaabdaeeab39b933d12c67d11978c95da Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Example: remove map exampleDennis Oberst2023-03-096-100/+1
| | | | | | | | | | | | | This example only demonstrates the use of blockingMapped. Considering that the QtConcurrent::mapped~ functions are already included in the wordcount example, and have very similar APIs to the QtConcurrent::filter~ functions, which are included in the progressdialog example, this no longer serves a useful purpose. Task-number: QTBUG-111165 Pick-to: 6.5 6.5.0 Change-Id: Ibc526e1a9fb17070e376e45151e9c2bdbc69bd32 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Example: update imagescaling exampleDennis Oberst2023-03-095-14/+17
| | | | | | | | | | | Updated the example to align with the Qt6 Example-Guideline. https://wiki.qt.io/Qt6/Example-Guideline Task-number: QTBUG-111165 Pick-to: 6.5 6.5.0 Change-Id: Ibd9e7ce0d4dee90f6a693b81516d2f5b86345b1d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* dbus examples: Remove listnames exampleIevgenii Meshcheriakov2023-03-036-114/+1
| | | | | | | Task-number: QTBUG-111366 Pick-to: 6.5 Change-Id: I5c483cbfec4072dae610c6d98b97d10057ba9ddc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* HTTP example: update screenshotMårten Nordheim2023-03-023-1/+1
| | | | | | | | Fixes: QTBUG-108874 Pick-to: 6.5 Change-Id: Ib87895c6512abb967734ce4c1ed0be76c698feb4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Move anchor layout example to manual testsJan Arve Sæther2023-03-027-193/+0
| | | | | | Pick-to: 6.5 6.5.0 Change-Id: I9c9a9dbcdaf705a31208b80b71e978938a492142 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Move xmlstreamlint example into tests/manualØystein Heskestad2023-03-026-185/+0
| | | | | | | | | | This example is useful but not a typical starting point for an application. Task-number: QTBUG-110647 Pick-to: 6.5 Change-Id: Ic4af8ed648c587b91110a7403fa80c619549289d Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Remove htmlinfo exampleØystein Heskestad2023-03-0211-3494/+1
| | | | | | | | | | This example is removed because what it does is already covered by the other XML examples. Task-number: QTBUG-110647 Pick-to: 6.5 Change-Id: If33e3fc55dcd9c7c10cfdfa86405f8bcf5cb6187 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Remove the 'sdi' exampleVolker Hilsheimer2023-03-0216-644/+3
| | | | | | | | | | | It is essentially the same as the other mainwindow examples, showing how to create a text editor. The only special code here is the tiling of the different main windows, which - without any documentation or explanation - is neither very helpful, nor relevant in 2023. Pick-to: 6.5 Change-Id: I48b92b1cf057f586e0d2842d1c0a3312154e9a13 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* DNS Lookup: Use ideomatic cstdio includeMårten Nordheim2023-03-021-19/+21
| | | | | | | | | Task-number: QTBUG-108873 Pick-to: 6.5 Change-Id: I646f0c985adc45a17103b5f98394f3def4b6ada2 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* DNS Lookup: Change local function to return struct instead of enumMårten Nordheim2023-03-021-36/+38
| | | | | | | | | | This let's us get rid of an out-parameter. Task-number: QTBUG-108873 Pick-to: 6.5 Change-Id: Ifc08d3905932f28ecdfdf3a7de1499700cc7e606 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* DNS Lookup: Use standard functions to print version/helpMårten Nordheim2023-03-021-4/+3
| | | | | | | | | | showHelp was already in use, but not showVersion. Return 0 in both cases, even if it's unreachable. Task-number: QTBUG-108873 Pick-to: 6.5 Change-Id: Iba820e89d7de066130163e7829f75bbfcfa3f7dd Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* DNS Lookup: reflow some code to avoid exceeding column limitMårten Nordheim2023-03-021-15/+31
| | | | | | | Task-number: QTBUG-108873 Pick-to: 6.5 Change-Id: Ic17ded256152f7d89bd200ea0e163f2b8f1ea70a Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* DNS Lookup: Use std::optional instead of casting enum to intMårten Nordheim2023-03-021-5/+5
| | | | | | | Task-number: QTBUG-108873 Pick-to: 6.5 Change-Id: I0bd5dc004154c1c4026be2feb6187c53e5e77801 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* DNS Lookup: Avoid unneeded allocations in parsing functionMårten Nordheim2023-03-021-11/+11
| | | | | | | | | | | By using .compare(~~~, Qt::CaseInsensitive) instead of .toLower() Task-number: QTBUG-108873 Pick-to: 6.5 Change-Id: I60e1fdc0a54450e7385e90f84fd509e62b82d2c9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Delete the Network Download (Manager)? examplesMårten Nordheim2023-03-0214-622/+0
| | | | | | | | | | | | | | | | | | | | Their use of QtNetwork is already covered by the HTTP example. While showcasing that QNAM easily deals with multiple simultaneous requests, waiting until finished() is emitted to write anything is not exactly idiomatic. And managing your own queue to only have one request running at a time is a weird example for an asynchronous framework. In this regard, having an example for a complete download manager (with a GUI) would be interesting, but may ultimately be very time-consuming to make for limited gain. Task-number: QTBUG-110643 Pick-to: 6.5 Change-Id: I6b2c1546b85fa89ab7ce1ff5565b0293b5710b74 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
* Move Weather Anchor Layout example to manual testsJan Arve Sæther2023-03-0214-327/+1
| | | | | | Pick-to: 6.5 Change-Id: I8782a83b5c12b4f57bf9ef9063818cb124bddd56 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Doc: move snippet for implicit translation contextVolker Hilsheimer2023-03-012-2/+2
| | | | | | | | | The 'sdi' example is a candidate for removal, so point at the spreadsheet example instead, which is not. Pick-to: 6.5 Change-Id: I4405f2421db8be79898a38ca4f3fa1ea5fe0280b Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Doc: fix links to renamed network examplesVolker Hilsheimer2023-03-015-8/+7
| | | | | | Pick-to: 6.5 Change-Id: I8790bb660070a092e268294b5640c6d5af41deb0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* pingpong example: Remove pong.hIevgenii Meshcheriakov2023-02-284-19/+12
| | | | | | | | | Move the class definition inside pong.cpp. Task-number: QTBUG-111366 Pick-to: 6.5 Change-Id: Id4b376451cb2bdbd04ccce4b2dcf0760dbfbfb2a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* pingpong example: Modernize the codeIevgenii Meshcheriakov2023-02-283-24/+22
| | | | | | | | | | | | | | | | | Use qWarning()/std::cout instead of C IO functions. Use default parameters for QDBusInterface's constructor. Remove useless Q_SCRIPTABLE. Use type-safe invokeMethod(). Extract a local variable for the used D-Bus connection. Task-number: QTBUG-111366 Pick-to: 6.5 Change-Id: Idc38a7c1dd97d71308d9491193039744c759d6f2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Remove duplicate wordsAndreas Eliasson2023-02-285-5/+5
| | | | | | Change-Id: Ia7a38a1035bd34d00f20351a0adc3927e473b2e7 Pick-to: 6.5 6.4 6.2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fortune* Example: update screenshotsMårten Nordheim2023-02-284-0/+0
| | | | | | | Fixes: QTBUG-108875 Pick-to: 6.5 Change-Id: Ib57482959973815681b0b178acea3634a4f63220 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove threadeqopenglwidget exampleLaszlo Agocs2023-02-2811-616/+0
| | | | | | | | | | | | | | | It is neither documented nor very useful, and it has platform-specific issues as reported over the years. Remove it now as part of the example revamp initiative. Task-number: QTBUG-50278 Task-number: QTBUG-110093 Task-number: QTBUG-76054 Task-number: QTBUG-43209 Pick-to: 6.5 Change-Id: I6dadaf4162b4c19411c544b9f204c19e37aa740d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* chat example: Update code styleIevgenii Meshcheriakov2023-02-272-66/+27
| | | | | | | | | | | Use lambdas instead of slots where practical. Consistently use signals to transmit D-Bus messages. Extract a local variable for the used D-Bus connection. Task-number: QTBUG-111366 Pick-to: 6.5 Change-Id: Icc6667e1392ada1b7d3b33c4e4b32917dd648390 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>