summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix missing references to 'Qt Widgets - Application Example'Tor Arne Vestbø2023-06-272-5/+1
| | | | | | | | Amends eda71105ff9a516059c6dd6643ff446a82edac81 Pick-to: 6.5 6.6 Change-Id: I44fa9acef37667d635d5770ce5d50fc52d92aa88 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix qdoc link warnings after moving a few examples to manual testsTor Arne Vestbø2023-06-271-2/+1
| | | | | | Pick-to: 6.5 6.6 Change-Id: I81a6e9d52e858c3f733d4c527c70408772813b56 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move dock widgets example to manual testTor Arne Vestbø2023-06-261-140/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I23ca3f2450df8f6c71509235ccec655d88d0d6d7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move dirview example to manual testTor Arne Vestbø2023-06-261-49/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I9057d5efb1cdf3e425e879f8cc96a544c1892e77 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move digital clock example to manual testTor Arne Vestbø2023-06-261-51/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I043c0060a71d9de2f3e74aab0759d07a20880c3a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move chart example to manual testTor Arne Vestbø2023-06-261-58/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I95a40834853a0157d8fa6137431bfd86ce855b2f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move character map example to manual testTor Arne Vestbø2023-06-261-251/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: Ie27fe436fc7ae7774beaa78f8a27f6009027753a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move calendar example to manual testTor Arne Vestbø2023-06-261-202/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: Ie2215ae0feeb322888619aed632e20db9b69e20b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move border layout example to manual testTor Arne Vestbø2023-06-261-46/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I3f45043a64275f8678288e1d9839271eafa1fd2b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move widgets blurpicker example to manual testTor Arne Vestbø2023-06-051-20/+0
| | | | | Change-Id: I7e19b84ac4b6a8e380fc9a7dcc37cc08ced89b4b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Move widgets Application example to manual testsAxel Spoerl2023-06-041-370/+0
| | | | | | | | | | | | | With 6e77da640aa84c1efe330d4a5224c9c7425ece57, the documentviewer demo's TxtViewer plugin has been fully documented in order to replace the Application example. This patch moves the application example to manual tests. Pick-to: 6.5 Change-Id: I67d975e478c7bc840613c8af1301a4eafe8f1a42 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Diagram Scene: Fix documentation word repetitonAndre Hartmann2023-05-291-1/+1
| | | | | | | Pick-to: 6.5 Fixes: QTCREATORBUG-29214 Change-Id: I356a6ffbd48bf918208180b8b403b5c74ad368d5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove the "classwizard" exampleVolker Hilsheimer2023-05-163-170/+3
| | | | | | | | | | | | | | It adds nothing new to what the trivial and license wizard examples show, other than a bunch of somewhat messy and outdated code to generate C++ code files based on the input. The example is referenced in a few parts of the documentation, but there are equivalent snippets in the trivial and license wizard examples, so point at those instead, and add some relevant API usage where needed. Pick-to: 6.5 Change-Id: If1ff57e775bad28920d9e019aeccae69d1f4d127 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Convert "extension" dialog example into snippetsVolker Hilsheimer2023-05-161-121/+0
| | | | | | | Pick-to: 6.5 Task-number: QTBUG-108751 Change-Id: I8ca4e058b832674dc0c8b84024cb70a667ee8db4 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Revamp the shapedclock exampleVolker Hilsheimer2023-05-161-54/+19
| | | | | | | | | | | | | | | | Rename it to "Translucent Background", as that's what the example shows how to do. And modern applications shouldn't use a (binary) mask to create shaped windows. Instead, set the TranslucentBackground attribute, don't paint pixels that should be fully transparent and use anti-aliased or semi-opaque painting for pixels that should be translucent. Adjust the example and documentation accordingly. Move the statment that widget masks create coarse visual clipping to the QWidget::setMask documentation. Pick-to: 6.5 Change-Id: Id49d854093f2cb471afb178d32723081c7543543 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Update screenshot exampleVolker Hilsheimer2023-05-151-1/+1
| | | | | | | | Refresh screenshot of the example, and remove "Example" word from title. Pick-to: 6.5 Change-Id: I88c00db5b25536c45622bc580a9da5aaf01610bc Reviewed-by: Liang Qi <liang.qi@qt.io>
* Move the addressbook tutorial into manual testsVolker Hilsheimer2023-05-151-948/+0
| | | | | | | | | | | | | | The tutorial is building an elaborate UI around a QMap. It doesn't use structured data, and it doesn't use model/view (which the dedicated addressbook example in itemviews does). It's not a good way of building an application, and the individual APIs for creating layouts, dialogs, or import/export are explained well enough in other examples. Pick-to: 6.5 Change-Id: Iffe47a0f6e04a933edb917c877ae845f50b74b4a Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Doc: Use the \examplecategory macro to tag examplesTopi Reinio2023-04-111-1/+1
| | | | | | | | | | | | | | | | The '\meta category' command was used for tagging examples with a specific category, used in Qt Creators Welcome mode. As we want to also generate lists of examples belonging to a category elsewhere in the documentation, replace the command with a macro that expands to the original \meta command and also adds the example to a group using the \ingroup command. This way, the category names can be used as arguments to the \generatelist or \annotatedlist commands. Pick-to: 6.5 Task-number: QTBUG-112731 Change-Id: I46762dabc5f718fecc09a3533235eaa911dda5a0 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix pointer mismatch after QList::move() in tooltip exampleAxel Spoerl2023-03-281-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | The tooltip example moves shape items within a QWidget. Shape items are stored in a QList of objects. When an item is moved, its pointer is taken from the QList and stored in a member variable. To have the moved item on the bottom of the list, QList::move() is called. This operation re-arranges the list objects, and the member variable starts pointing at a wrong object. This patch changes the list from a list of objects, to a list of pointers. Shape items are therefore allocated on the heap. A destructor is added to free the heap with qDeleteAll. The example's documentation is adapted accordingly and a snippet for the destructor is added. As a drive-by, int is replaced by qsizetype where it was used as an index of a QList. Fixes: QTBUG-104781 Pick-to: 6.5 6.2 Change-Id: I9be26fa7954be5f85729d24f166d66980af71801 Reviewed-by: Shawn Rutledge <shawn.rutledge@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>
* 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>
* Move anchor layout example to manual testsJan Arve Sæther2023-03-021-57/+0
| | | | | | Pick-to: 6.5 6.5.0 Change-Id: I9c9a9dbcdaf705a31208b80b71e978938a492142 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Remove the 'sdi' exampleVolker Hilsheimer2023-03-022-16/+2
| | | | | | | | | | | 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>
* Move Weather Anchor Layout example to manual testsJan Arve Sæther2023-03-021-14/+0
| | | | | | Pick-to: 6.5 Change-Id: I8782a83b5c12b4f57bf9ef9063818cb124bddd56 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Doc: Remove duplicate wordsAndreas Eliasson2023-02-283-3/+3
| | | | | | Change-Id: Ia7a38a1035bd34d00f20351a0adc3927e473b2e7 Pick-to: 6.5 6.4 6.2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix qtbase build when all deprecated code are disabledYuhang Zhao2023-02-221-2/+2
| | | | | | | | | Adjust the callers to use the non-deprecated APIs. Pick-to: 6.5 Change-Id: I8e96f25684a2d613bc400a8626dc9e3af2bb8dcf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Examples: move widgets/codeeditor into manual testsVolker Hilsheimer2023-02-092-179/+0
| | | | | | | | | | | | | It's not a very well written example, using (largely unneed) hacks to implement what it does. It's also misleading - the syntaxhighlighter example is a better showcase for building a useful code editor. Move it to manual tests. Fixes: QTBUG-111025 Pick-to: 6.5 Change-Id: I405d41688235bf3e9a08373e716769f26d02fec6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Move findfiles example into manual testsVolker Hilsheimer2023-02-091-269/+0
| | | | | | | | | | | | | | | | | | | | The example follows bad and outdated practices: - running time consuming and I/O heavy workload in the GUI thread - calling processEvents to keep the UI responsive - showing results only at the end of a search rather than continuously Perhaps this example can be rewritten at some point to apply modern practices (at least use a thread and emit signals), but it seems to have low overall educational value. Moving it to be a manual test for now. Fixes: QTBUG-111002 Pick-to: 6.5 Change-Id: Id630fd4599096448ea4f96bcbf977b11a039796f Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Turn elidedlabel example into a code snippetVolker Hilsheimer2023-02-091-131/+0
| | | | | | | | | | | | The example is 90% boiler plate for subclassing QFrame and providing a bit of GUI to change the size of the label using sliders. The interesting bit is a block of 25 lines of code, so turn those into a snippet and add that to the QTextLayout overview documentation. Fixes: QTBUG-111011 Pick-to: 6.5 Change-Id: I6e97b2ea47b553c8d998ad185cfac006721ef7ee Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix analog clock example to adhere to guidelinesJan Arve Sæther2023-02-022-3/+6
| | | | | | | | Guidelines: https://wiki.qt.io/Qt6/Example-Guideline Pick-to: 6.5 Change-Id: I12c65ae11e7906fd2e9dfb449072199560488aed Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Remove wiggly exampleJan Arve Sæther2023-01-311-147/+0
| | | | | | | | | It demonstrates timerEvent() and some QFontMetrics There are other examples that demonstrates this Pick-to: 6.5 Change-Id: I4ad6f30c8ef93c995f980545ed88ab13b9aa9c7d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge "undo" and "undoframework" examplesVolker Hilsheimer2023-01-312-44/+17
| | | | | | | | | | | | | | | | | | The "undo" example didn't show anything that the "undoframework" example doesn't, and the latter is more comprehensive and properly documented. "undoframework" also uses QGraphicsView instead of inventing its own diagram widget. However, the "undo" example created a nicer UI with toolbuttons, icons, and the undo view in a dock widget, so reuse those elements in the "undoframework" example instead. Update the documentation quoting tags accordingly, and clean up a bit. Pick-to: 6.5 Change-Id: I3c91feecbd5fe3e5900838b0b51f9fe7bd190280 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Adhere to https://wiki.qt.io/Qt6/Example-GuidelineJan Arve Sæther2023-01-261-2/+2
| | | | | | | | * Remove "Example" suffix in title Pick-to: 6.5 Change-Id: I5da311850ab8f725da363969d7a8d8a1a85f8d70 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Fix Style Plugin Example, and add some CMake DocsAmir Masoud Abdol2023-01-181-8/+33
| | | | | | | | | | | | | | | | | | | | A few things: - Improved the documentation by adding a CMake section, briefly describing the process of adding the plugin, and placing it where it should be. - Write a note about the case where the style may be overwritten at launch, and how to set the a new style using a CLI - Improved the CMake build such that it creates the App Bundle correctly, and also works without an App Bundle as well. - Changed the example, and plugin such that now instead of a QPushButton we have a QTextEdit, and change the text color. - Replaced the application screenshot Fixes: QTBUG-107842 Fixes: QTBUG-109227 Change-Id: I161a91b27df016ff6230fac3871b79d2dfbdf18a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Don't use file dialog in the address book exampleJan Arve Sæther2023-01-131-8/+6
| | | | | | | | | | | | | | | On small screen devices such as iPhone targets, the save file dialog is using a non-native dialog, and it doesn't fit the screen real estate to the extent that the [Ok] button is clipped away. In addition, the open file dialog and the save file dialog doesn't cooperate very well on platforms such as iOS without more plumbing. Since using the file dialog is out of the scope for this example we remove all usages of it. Pick-to: 6.5 Change-Id: Ie165355ed0b671d93e44d2d55791156367b0ea5c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* wiggly example: add support for emojis etc. (utf16 surrogate pairs)Eirik Aavitsland2022-12-121-5/+8
| | | | | | | | | | | The venerable wiggly example was created before unicode support was added to Qt. Hence, when extracting the individual characters from the string for painting, the code was not prepared to handle that some characters, like emojis, are composed of two QChar elements. Fixes: QTBUG-28853 Change-Id: I9804415f92775e2b78fa9fcaf7a2d112153cdce0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Move i18n example to qttoolsKai Köhne2022-11-011-16/+0
| | | | | | | | Move i18n example out of qtbase. In qttools, it can use lrelease, avoiding the need to store .qm files in the repository. Change-Id: I8ba36a1372c2a743b809e3f7ea95a67825558f41 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add a shortcut editor exampleLaszlo Papp2022-10-251-0/+230
| | | | | | | | | | | | | | | Many applications offer shortcuts for quick interaction with the application. It is also common in such applications to offer a shortcut editor in the preferences or separately in a dialog. However, even though this is a fairly common use case for applications with more than a couple of shortcuts, there is no good and comprehensive official Qt example how this could be achieved. This change is an attempt to bridge the gap. Change-Id: Ic01a404e6157bda1b0a75a0b792cbfe5d910d48f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix typos in docs and commentsKai Köhne2022-06-1512-18/+18
| | | | | | | | | Found by codespell Pick-to: 6.4 Change-Id: Ie3e301a23830c773a2e9aff487c702a223d246eb Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-16106-2756/+212
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Rewrite the fetchmore exampleFriedemann Kleint2021-04-231-7/+10
| | | | | | | | | | | | | - Start in root folder so that large directories (/bin/, Windows) are easily reachable - Remove the line edit and navigate by double clicking instead since this is more in line with expectations - Use a QPlainTextEdit for logging - Make the log message more informative - Add icons Change-Id: Ia3cd7fc143efef80772923291f0b711913aa47be Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix various documentation issuesTopi Reinio2021-03-161-3/+3
| | | | | | | | | | - Document QIODeviceBase - Document QPointerEvent::points - Fix linking issues Task-number: QTBUG-90662 Change-Id: Ib123d5708953b22e01f95c82626b39a49fff95b2 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Fix documentation links to High DPI documentationAndreas Buhr2020-12-011-1/+1
| | | | | | | | | | | The documentation on High DPI was recently rewritten, renaming several sections. This patch fixes the links which were broken by this change. Task-number: QTBUG-88533 Pick-to: 6.0 Change-Id: I5e9417554270a6740986d7cec5e3433d043e5560 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Rename Application ExampleVolker Hilsheimer2020-11-263-6/+6
| | | | | | | | | | Prefix it with "Qt Widgets -" to make it a bit clearer in the list of highlighted examples which module this one is about. Pick-to: 6.0 6.0.0 Change-Id: I0bf65b02db72173f1adfe0bcf8657be7905dbd6c Reviewed-by: Tuukka Turunen <tuukka.turunen@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix documentation warnings for Qt WidgetsTopi Reinio2020-11-121-48/+0
| | | | | | | | | | - Exclude forwarding headers to Qt GUI as they caused the headers to be parsed twice. - Drop documentation for removed example Task-number: QTBUG-86295 Change-Id: I08eb46b7c7f813f103cc545f931896be99a3ccec Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix a bunch of qdoc warningsVolker Hilsheimer2020-11-062-4/+4
| | | | | | | Remove or fix references to removed APIs, and some qdoc syntax fixes. Change-Id: I67d71062cd7a29f4eb74b02199b1482af5e59fc0 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Use QScroller in the Dir View exampleShawn Rutledge2020-10-141-2/+8
| | | | | | | | | | | We have never had enough examples that show how easy it is to install a QScroller. In this case, one line makes a QTreeView flickable. Pick-to: 5.15 Task-number: QTBUG-86090 Change-Id: Idb8b4709617befb261f3b78d63ddbdaf5ad18d6b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Stylesheet example: Get rid of auto-connection slotsAlexander Volkov2020-09-251-8/+8
| | | | | Change-Id: I55d89cf33e5f9c8aef3a3dfbbdcd212415d35bcb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* macOS: rename 'macintosh' style to 'macos'Richard Moe Gustavsen2020-08-261-2/+2
| | | | | | | | | | | | | | Change the name/key of the style to 'macos'. Besides the name 'macintosh' being archaic, we also need this change to avoid creating 'macintosh' style folders in QtQuickControls, now that we plan to use QPlatformTheme also there to resolve the style. [ChangeLog][Widgets][QStyle] The 'macintosh' style has been renamed to 'macos'. Change-Id: I14b8a8b4dbd369e7a7d16b94e4ad27e501e7e8d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move QStateMachine from QtCore to QtScxmlKarsten Heimrich2020-08-2412-1642/+0
| | | | | | Task-number: QTBUG-80316 Change-Id: I2ee74110fd55e94d86321d3b3dc5bb8297424ed4 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>