summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Fix the systray example to only show an icon when requestedVolker Hilsheimer2019-07-091-4/+5
| | | | | | | | | | | | The "None" and "Custom icon" cases where using the same value for icon type, which resulted in both options showing the application icon. Use -1 to indicate the custom option, and treat all other options the same. Task-number: QTBUG-76916 Change-Id: Ib715f5d328175bd6e221b3f507087954fa542838 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* styles example: Use QImage instead of QPixmap in NorwegianWoodStyleTor Arne Vestbø2019-06-252-7/+8
| | | | | | | | | | | | Using QImage allows creating the style before the application has been created, and is the more modern API. No changes to the documentation needed. Change-Id: Ifa0e5fa1113802fca18fbd45bb3c0a5ba1dbfeab Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Doc: Fix typo in briefPaul Wicking2019-06-191-1/+1
| | | | | | Fixes: QTBUG-76512 Change-Id: I8db4288b22416c6af9aaaa72c5005b81d79bf620 Reviewed-by: Martin Smith <martin.smith@qt.io>
* hellogles3: Request core profile contextLaszlo Agocs2019-05-111-3/+3
| | | | | | | | | | | | | ...instead of compatibility, in order to play nice with systems that have no compatibility profile support (macOS). Instancing needs OpenGL 3.x so sticking with 2.x contexts is not an option. The example looks fully compatible with core profile so its functionality should not change. Change-Id: If0d554a6208973aa8a4fb86757e246d170cd0e71 Fixes: QTBUG-75680 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Examples: properly parse more than one element in maps and listsThiago Macieira2019-03-221-3/+3
| | | | | | Change-Id: I46363e5b8944459e8c48fffd158c03bca4b7394e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use High DPI pixmaps in prominent examples and testsFriedemann Kleint2019-03-155-0/+9
| | | | | | | | | Set AA_UseHighDpiPixmaps. Task-number: QTBUG-52622 Change-Id: Ic4373a9c94952f50bc1ad36bcc0dec850efc124a Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add cmdline feature to qmakeJoerg Bornemann2019-02-1816-32/+17
| | | | | | | | | [ChangeLog][qmake] A new feature "cmdline" was added that implies "CONFIG += console" and "CONFIG -= app_bundle". Task-number: QTBUG-27079 Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Use requestUpdate instead of timer in a few GL examplesTor Arne Vestbø2019-01-224-10/+24
| | | | | Change-Id: I235ad367fe693c86ef5a0844fde0573371b284db Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: cleanup semaphore exampleSamuel Gaist2019-01-031-6/+0
| | | | | | | | This patch removes unused signal and variable. Change-Id: Ia4eaf083493d3d37e3ff22e0380d5a5ee69f91cf Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* threads: disable threads examples for nothread buildsLorn Potter2018-12-101-1/+2
| | | | | Change-Id: I2c253de973f5399c5ed68194b969ccebe457c689 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Codecs example: Add a dialog for showing common C++ encodingsFriedemann Kleint2018-11-307-2/+441
| | | | | | | | | | Add a dialog where the user can enter a line of text, which is then displayed in several encodings with special characters converted suitable for C++/Python string literals. Task-number: QTBUG-60635 Change-Id: Ibd436f9f76e128c93cbb581235c730d636641d8a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Take device-pixel-ratio into account in openglwindow exampleTor Arne Vestbø2018-11-201-1/+2
| | | | | | | | Also affects the windowcontainer example, which includes an OpenGL window. Change-Id: Ic9f0f2aa66410b657e08c0225b085dd8df44e2a7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Itemviews: Cleanup examplesChristian Ehrlicher2018-11-1229-192/+161
| | | | | | | | | | | | | | | Cleanup some minor issues in the chart example: - remove unused members - use initializer list for members - pass a proper role to dataChanged() - honor roles parameter in PieView::dataChanged() - use nullptr instead 0 - use new-style connect - fix indentation and other whitespaces Change-Id: Idb212b07c006fe3ae31bee9cd9b1ba4d03043b5e Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-096-0/+0
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/Makefile.unix src/gui/text/qtextdocument.cpp src/gui/text/qtextdocument.h Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
| * Update the floppy disk icon (save) to be physically correctThiago Macieira2018-11-066-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Documentation] Fixed the icons for the "file save" action that were inaccurate representations of a 3.5-inch floppy disk (the cut edge was on the wrong side). Now all floppy representations are physically accurate. Change-Id: Ia3b27ae12a1a4fefa3b7fffd155bb86fee5271c3 Fixes: QTBUG-71012 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix composition example during OpenGL resizesAllan Sandfeld Jensen2018-11-071-2/+5
| | | | | | | | | | | | | | | | Previous images were sometimes not cleared correctly. Change-Id: I62949b756bf797aa79c5160774f2f258e5c353dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Tablet example: Fix warning about switch/fallthroughFriedemann Kleint2018-11-011-1/+1
| | | | | | | | | | | | | | | | Add Q_FALLTHROUGH(), fixing: tabletcanvas.cpp:222:55: warning: this statement may fall through [-Wimplicit-fallthrough=] Change-Id: I573f4add56774218e28a7c5f1dac09c5402333c0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Notepad example: Get rid of auto-connection slotsAlexander Volkov2018-11-013-43/+60
| | | | | | | | | | | | | | | | Their correctness is not checked at compile time and even object renames can break code. Change-Id: I99273a28743a79a76c00e6db0ed4cd6d7eba8bf2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Move arthurwidget based examples to new QOpenGL classesAllan Sandfeld Jensen2018-10-1718-239/+346
| | | | | | | | | | | | | | | | Several of the examples were not even working besides using deprecated classes. Change-Id: I352e0629d490593edcc5868d2ec5a8ff222eaeab Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-173-10/+1
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| * Modernize the "animation" featureLiang Qi2018-10-123-10/+1
| | | | | | | | | | | | Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Fix builds without DTLSAllan Sandfeld Jensen2018-10-091-6/+2
| | | | | | | | | | | | | | Change-Id: Ic7215c7aa0bf6f7b37ae34649d809f2e1e1ee95b Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-302-2/+4
|\| | | | | | | Change-Id: Iaa438d14357be1bf75bb645cb8d3245947c055b8
| * Modernize the "filesystemwatcher" featureLiang Qi2018-09-272-2/+4
| | | | | | | | | | | | Change-Id: If030b56ad97e047d89d442629262b4839df306d4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Make the textedit example use dark text on light background on macOSMorten Johan Sørvig2018-09-251-0/+8
| | | | | | | | | | | | | | | | | | Many text documents will be designed for a white-paper look, and in these cases it is desirable that the editor colors matches. Change-Id: I66d721f8c2e27b78a2b885c6cfd74f897fe42389 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Doc: Move touch examples around so they get included in docsPaul Wicking2018-09-1431-8/+88
| | | | | | | | | | | | Task-number: QTBUG-59249 Change-Id: I71f1d2e28f0cadbad1d6bcf117198018eaf8e012 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-141-8/+8
|\| | | | | | | Change-Id: Ic4c1a8041dcfd143861c39e0014fbdaaa3fb25c6
| * Doc: improve Mandelbrot exampleMitch Curtis2018-09-111-8/+8
| | | | | | | | | | Change-Id: Iac6c3e681f3d5b195d08513ac5fe4b661c3d0f59 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Fix device local alloc in hellovulkantextureLaszlo Agocs2018-09-121-0/+10
| | | | | | | | | | | | | | | | | | | | Running with QT_VK_FORCE_STAGE_TEX does not work at all with recent NVIDIA drivers due to QVulkanWindow's and the example's naive way of picking the memory index. Enhance this and add a warning note to the QVulkanWindow docs as well. Change-Id: I7f200e11d982b56e3da3b71ee3915bd7bfca5cc1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Fix src access with staging buffer in hellovulkantextureLaszlo Agocs2018-09-121-3/+3
| | | | | | | | | | Change-Id: Iafcd94ec812a61dcfae6da43b1ca9f5771e05e56 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Example: Close popup on mouse click without assigning new lens positionPaul Wicking2018-09-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Clicking in the main renderer window passes a new position to the lens, disregarding the "What's This" (documentation) overlay window. This change checks if the documentation window is open on click, and if it is, closes the documentation window and returns without further handling of the mouse event. Fixes: QTBUG-7205 Change-Id: I821245ec6c78be00d80af461baf8e4d59e0f351f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-074-5/+5
|\| | | | | | | Change-Id: I66c7f18a2abd13601da0947919436f7da3549ae9
| * Revise an incorrect QVulkanWindow doc noteLaszlo Agocs2018-09-063-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Applying the transformation in question has no effect on the winding order. Rewrite that section. While all the examples are correct, clarify the rules for the geometry they use since the winding order varies. Fix up the triangle example code to use front=CCW for clarity (even though it does not matter much since culling is off there). Change-Id: Icb968c76cc9fa918a5608d3c66b4fccd5668175e Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * Examples: Fix minor bug in Tree Model Completer ExamplePaul Wicking2018-08-301-1/+1
| | | | | | | | | | | | | | | | Minor bug that caused highlighter to not work properly. Task-number: QTBUG-66084 Change-Id: I7860d7a13c402e3236f4c844020e35e11f6e53e5 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Tablet example: paint only the changed areas of the canvasShawn Rutledge2018-08-301-2/+4
| | | | | | | | | | | | | | This improves performance significantly. Change-Id: I9a8782148ce03a2bc85759c4e8c1eecb37467cf6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Tablet example: add a menu item to clear the canvasShawn Rutledge2018-08-234-4/+22
| | | | | | | | | | | | | | | | It's annoying to have to kill the app and start over when it gets too cluttered. Change-Id: Ic72e372e5742de4e7c6bb818a3150283498a517b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-171-0/+0
|\| | | | | | | Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
| * Doc: Update out-of-date screenshots in example docsPaul Wicking2018-08-161-0/+0
| | | | | | | | | | | | Task-number: QTBUG-63248 Change-Id: I4cd47977ae020b43ca92b1781ac8b038e6ef851c Reviewed-by: Martin Smith <martin.smith@qt.io>
* | DTLS server - use the proper TLS configurationTimur Pocheptsov2018-08-101-0/+1
| | | | | | | | | | | | | | | | | | The one we had before was invalid and we ended up with defaultDtlsConfiguration which has peerVerifyMode == AutoVerify. Change-Id: I5b9ceb027e90189325c1d8fd0db37d1b212ebbc8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Document DTLS examplesTimur Pocheptsov2018-08-0913-27/+255
| | | | | | | | | | | | | | | | Task-number: QTBUG-68070 Change-Id: I2b08322049005b02f1ed680bee21992ade16813a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Document the DTLS APITimur Pocheptsov2018-08-092-0/+73
| | | | | | | | | | | | | | Task-number: QTBUG-68070 Change-Id: Ifd08ecb7c2c1a6dc352952a10ad56259bd1ecf10 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-071-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| * Doc: Synchronize documentation with code snippetPaul Wicking2018-08-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | * The plugin IID with version number was removed in transition to new plugin system, see efde205586a70320d0525e941e5a1cd9657bdd30. * This change re-adds the version number, so that we deliver on the best practices as mentioned in the documentation for the example. Task-number: QTBUG-59487 Change-Id: I88596e71cf18be88d0b1d28d56b6d3bb72fe756b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge "Merge branch '5.11' into dev" into refs/staging/devEdward Welbourne2018-07-311-10/+21
|\ \
| * | Merge branch '5.11' into devEdward Welbourne2018-07-311-10/+21
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
| | * Doc: Update Tetrix examplePaul Wicking2018-07-191-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | Use new connect syntax throughout the example. Task-number: QTBUG-69503 Change-Id: I5ab1453318e60586a9655ecb58263778c02aba4f Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | | Examples: Revamp LoopbackAndre Hartmann2018-07-303-41/+45
|/ / | | | | | | | | | | | | | | | | | | | | | | | | * order and sort includes * use functor connect * use nullptr * use member init * added sanity check for nextPendingConnection() * small cleanup here and there Change-Id: I72c6758b5fedea0937a1f2cb9031cb7203f5d955 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QDtls - use conventional namesTimur Pocheptsov2018-07-272-7/+7
| | | | | | | | | | | | | | | | More Qt-style and more natural, also, shorter names. Change-Id: I97bd68a8614126d518a3853027661435dc4e080d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | QDtls - refactorTimur Pocheptsov2018-07-262-7/+7
| | | | | | | | | | | | | | | | | | This patch renames rather awkward 'remote' into more conventional 'peer' (similar to what we have in QAbstractSocket). Change-Id: Ifc45e538b8adf9cc076bd7aee693277829fd94dc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Add demo of the new QGradient presets to the gradients exampleEirik Aavitsland2018-07-244-4/+74
| | | | | | | | | | | | | | | | In the gradients example, allow the user to select and show QGradient's named presets. Change-Id: I40bc6cbe3a0316ce49d67d63511881b6f6112574 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>