summaryrefslogtreecommitdiffstats
path: root/examples/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
* Move windowcontainer example to manual testTor Arne Vestbø2023-06-295-193/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I68b866bcc2659b90aad2c10dc06240674bf4a826 Reviewed-by: Richard Moe Gustavsen <[email protected]>
* Modernize EditableTreeModelCarl Schwan2023-06-285-81/+79
| | | | | | | | | - Use unique_ptr instead of manual memory management - Improve consistenty in variable name with the simpletreemodel childrenNumber -> row, m_ prefix for member variables Change-Id: Iface30c2224c2b1db7c623a9e6fcbb449c556f3e Reviewed-by: Volker Hilsheimer <[email protected]>
* Modernize SimpleTreeModel exampleCarl Schwan2023-06-285-61/+59
| | | | | | | | Use std::unique_ptr to manage items tree memory allocations. This also use the new string literals operator. Change-Id: Iab002b5dc612b75cef0be10862e263c6c6c013c1 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move movie example to manual testTor Arne Vestbø2023-06-289-323/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: Ie185a3c88eced7b8b0fe324b9ef62ab86d38d521 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move pinch zoom example to manual testTor Arne Vestbø2023-06-2813-391/+1
| | | | | | Pick-to: 6.5 6.6 Change-Id: I0632a839ef069e13a8b859a22f47be2e7423ffb0 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move validators example to manual testTor Arne Vestbø2023-06-2816-790/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: Ic91bc89422fb23e3782db69bab2953e7cf8ddf69 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move item views puzzle example to manual testTor Arne Vestbø2023-06-2815-694/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: Idbb4222861be86275a86f731e75127b8496a08a7 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move interview example to manual testTor Arne Vestbø2023-06-2813-311/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I06c77672c3ca08dfd3e50af25ed3e1669462259a Reviewed-by: Volker Hilsheimer <[email protected]>
* Move image viewer example to manual testTor Arne Vestbø2023-06-2813-838/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I4b64033f1a075681ce5b918fdf2e018ad05a7869 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move icons example to manual testTor Arne Vestbø2023-06-2828-1784/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I08f44448f96a61f780c21d628954879c7b28dce3 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move graphis view flow layout example to manual testTor Arne Vestbø2023-06-2811-356/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I713816114b87def9eab79b893d13554f1c37c6a5 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move fridge magnets example to manual testTor Arne Vestbø2023-06-2813-761/+1
| | | | | | Pick-to: 6.5 6.6 Change-Id: I6e40aff63f24dc98ab6b84450d288159f036142b Reviewed-by: Volker Hilsheimer <[email protected]>
* Move font sampler example to manual testTor Arne Vestbø2023-06-289-597/+1
| | | | | | Pick-to: 6.5 6.6 Change-Id: I696d9be26edfaadd40579884930b2f061d308a06 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move finger paint example to manual testTor Arne Vestbø2023-06-2810-556/+1
| | | | | | Pick-to: 6.5 6.6 Change-Id: I26eec035eaa78eac2aa96de72ae38093bc08fd23 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move fade effect example to manual testTor Arne Vestbø2023-06-2815-229/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I7f4e1d9b57be2d0ef22eb56d5d1f7abc5074ebae Reviewed-by: Volker Hilsheimer <[email protected]>
* Move embedded dialogs example to manual testTor Arne Vestbø2023-06-2813-495/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I86213aa47def7ebacaa9465a0200cef10871706e Reviewed-by: Volker Hilsheimer <[email protected]>
* Move dynamic layouts example to manual testTor Arne Vestbø2023-06-288-344/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I34288b2b22cbbfb3b77870f0c71778bcf3d552fb Reviewed-by: Volker Hilsheimer <[email protected]>
* Move drag and drop puzzle example to manual testTor Arne Vestbø2023-06-2816-609/+1
| | | | | | Pick-to: 6.5 6.6 Change-Id: I859cdb2cf74cd6272c29924c77dab26b4f4c0b6c Reviewed-by: Volker Hilsheimer <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* Move dock widgets example to manual testTor Arne Vestbø2023-06-2613-580/+1
| | | | | | Pick-to: 6.5 6.6 Change-Id: I23ca3f2450df8f6c71509235ccec655d88d0d6d7 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move dirview example to manual testTor Arne Vestbø2023-06-266-157/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I9057d5efb1cdf3e425e879f8cc96a544c1892e77 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move digital clock example to manual testTor Arne Vestbø2023-06-268-171/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I043c0060a71d9de2f3e74aab0759d07a20880c3a Reviewed-by: Volker Hilsheimer <[email protected]>
* Move chart example to manual testTor Arne Vestbø2023-06-2612-905/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I95a40834853a0157d8fa6137431bfd86ce855b2f Reviewed-by: Volker Hilsheimer <[email protected]>
* Move character map example to manual testTor Arne Vestbø2023-06-2610-826/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: Ie27fe436fc7ae7774beaa78f8a27f6009027753a Reviewed-by: Volker Hilsheimer <[email protected]>
* Move calendar example to manual testTor Arne Vestbø2023-06-269-482/+1
| | | | | | Pick-to: 6.5 6.6 Change-Id: Ie2215ae0feeb322888619aed632e20db9b69e20b Reviewed-by: Volker Hilsheimer <[email protected]>
* Move border layout example to manual testTor Arne Vestbø2023-06-2610-387/+0
| | | | | | Pick-to: 6.5 6.6 Change-Id: I3f45043a64275f8678288e1d9839271eafa1fd2b Reviewed-by: Volker Hilsheimer <[email protected]>
* Replace QDialog::exec() with open() in text edit exampleMikolaj Boc2023-06-202-91/+149
| | | | | | | | | | | | | | | | | | | | | | | | On WASM, the shortcut triggering the dialog in textedit example seemingly lets the event invoke the default action. What really happens is that the dialog's exec() does not return and WASM does not have a chance to set preventDefault() on the keyboard event it receives. This masks other problems with keyboards shortcuts. Uses of exec() on message boxes were replaced, too. Closing operation is now performed in two steps, first the event is ignored and maybeSave is called to query for potential changes of the text document. If there are no changes or the file is discarded, the close continues with a second event, now accepted. PrintDialog::exec(), QPrintPreviewDialog::exec(), QFileDialog::exec() were also eliminated in favor of open(). Finally, indirect calls to exec() via QColorDialog::getColor were removed. Task-number: QTBUG-76587 Change-Id: Ia90fad46ec3f94244723512be3ec93b64df9d9ef Reviewed-by: Mikołaj Boc <[email protected]>
* Examples: "About &Qt" should show info about Qt, not quitEdward Welbourne2023-06-161-1/+1
| | | | | | | | | | | A few examples seem to have copied and pasted a help action "About &Qt" that triggered QCoreApplication::quit. This does not look like best practice. Use QApplication::aboutQt instead. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I1887a3c999d752a24c7c4d3cabc4a5d63b29b966 Reviewed-by: Friedemann Kleint <[email protected]>
* Move scroller/graphicsview example into tests/manualVolker Hilsheimer2023-06-127-304/+0
| | | | | | | | | | | The example seems incomplete, is undocumented (and unused in shippets, in spite of tags being present), and generally full of comments that give the impression that this is for manual testing rather than showing best practices. Pick-to: 6.5 6.6 Change-Id: Ie615420e493cc6bb461c5d9ff8d4ae82bb3591db Reviewed-by: Richard Moe Gustavsen <[email protected]>
* Move storageview example into tests/manualVolker Hilsheimer2023-06-127-294/+1
| | | | | | | | | The code is mostly an implementation of a model based on QStorageInfo, shown in an otherwise uninteresting tree view. Pick-to: 6.5 6.6 Change-Id: Id6ce70d71ddc9bcd6e82a9ee12f5e1af159eac7a Reviewed-by: Richard Moe Gustavsen <[email protected]>
* Remove flattreeview exampleVolker Hilsheimer2023-06-125-82/+0
| | | | | | | | The relevant bits are a two-line snippet. Pick-to: 6.6 6.5 Change-Id: Id1731e5bc6585b1d1fd684817b39d19ad0a8a9cc Reviewed-by: Richard Moe Gustavsen <[email protected]>
* Dialogs example: add checkbox for ColorDialogOption::NoEyeDropperButtonOliver Eftevaag2023-06-121-0/+1
| | | | | | | | | If we wish to introduce a new color dialog option, then we might as well use it in our example. Change-Id: I7771d9d50e2ab0489fbeece8dea38a0b72b9b21e Reviewed-by: Oliver Eftevaag <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
* Doc: Fix documentation issuesTopi Reinio2023-06-092-0/+4
| | | | | | | | | | | | | | | | The Qt Widgets Application example was moved to manual tests, and no longer contains the snippet identifiers. Fix \snippet and \quotefile commands to quote similar code snippets from other examples or snippet files. Fix also the following documentation warnings: * No such parameter 'parsingMode' in QUrl::fromEncoded() * Missing image: rsslisting.cpp Pick-to: 6.6 6.5 Change-Id: Ibc989e83abc49837db08628facaf8e5f72b2f123 Reviewed-by: Tor Arne Vestbø <[email protected]>
* Examples: Remove unnecessary Q_INIT_RESOURCE callsKai Köhne2023-06-0835-70/+0
| | | | | | | | | | | Explicit calls to Q_INIT_RESOURCE are only needed for resources embedded in static libraries. See also https://doc.qt.io/qt-6/resources.html#explicit-loading-and-unloading-of-embedded-resources Pick-to: 6.5 6.6 Change-Id: I06a24d1c04369eedc78ca60a6ca02ce33907d9e7 Reviewed-by: Joerg Bornemann <[email protected]>
* Move widgets blurpicker example to manual testTor Arne Vestbø2023-06-0521-346/+0
| | | | | Change-Id: I7e19b84ac4b6a8e380fc9a7dcc37cc08ced89b4b Reviewed-by: Richard Moe Gustavsen <[email protected]>
* Move widgets Application example to manual testsAxel Spoerl2023-06-0416-907/+3
| | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
* 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 <[email protected]>
* shortcuteditor example: Don't reference null-actionTor Arne Vestbø2023-05-171-5/+5
| | | | | | | | | The parent nodes of the leaf ShortcutEditorModelItem nodes do not have an action item. Pick-to: 6.5 Change-Id: If9f8554101974a96f95db048b1bd691f3e89a23a Reviewed-by: Volker Hilsheimer <[email protected]>
* Remove the "classwizard" exampleVolker Hilsheimer2023-05-1620-794/+13
| | | | | | | | | | | | | | 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 <[email protected]>
* Convert "extension" dialog example into snippetsVolker Hilsheimer2023-05-168-303/+0
| | | | | | | Pick-to: 6.5 Task-number: QTBUG-108751 Change-Id: I8ca4e058b832674dc0c8b84024cb70a667ee8db4 Reviewed-by: Axel Spoerl <[email protected]>
* Revamp the shapedclock exampleVolker Hilsheimer2023-05-163-66/+22
| | | | | | | | | | | | | | | | 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ø <[email protected]>
* Doc cleanup: remove old gettingStarted tutorial, move doc fileVolker Hilsheimer2023-05-1522-517/+1
| | | | | | | | | | | The Qt getting started tutorial is based on the "notepad" example files in this directory, the gettingStarted/gsQt files are completely unused and not referenced in documentation. Pick-to: 6.5 Change-Id: If8caebd2c8359c81f94f72ef40a1cf92a021a83f Reviewed-by: Safiyyah Moosa <[email protected]> Reviewed-by: Axel Spoerl <[email protected]>
* 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 <[email protected]>
* Move the addressbook tutorial into manual testsVolker Hilsheimer2023-05-1547-3747/+1
| | | | | | | | | | | | | | 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 <[email protected]>
* 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 <[email protected]>
* Remove unused variable/codeAmir Masoud Abdol2023-04-072-7/+0
| | | | | | | Pick-to: 6.5 Change-Id: I8d28db64c1ae2c57c95b2f9f22303d74172226e9 Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
* Fix CMakeLists.txt of echo plugin exampleAxel Spoerl2023-04-061-1/+5
| | | | | | | | | | | | This patch adds a missing dependency to the echo plugin for shared builds. Since it fixes the last remaining example, it closes the Jira ticket. Fixes: QTBUG-112300 Pick-to: 6.5 Change-Id: Ib1da2d7d5f5d54d7224f1c65a995f3752037e5be Reviewed-by: Joerg Bornemann <[email protected]>
* Fix pointer mismatch after QList::move() in tooltip exampleAxel Spoerl2023-03-283-24/+36
| | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* CMake: build the shared plugin when building the plugandpaint targetJoerg Bornemann2023-03-281-1/+5
| | | | | | | | | | | | People expect that building the "main target" of an example builds all necessary subtargets as well. Add a dependency from plugandpaint to pnp_extrafilters. Pick-to: 6.5 Task-number: QTBUG-112300 Change-Id: I036beb961fe474ff060f93c98f5e2bda58e66f71 Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>