aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/snippets
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Unqmakify "Qt for Windows - Deployment" pageJoerg Bornemann2025-11-111-14/+8
| | | | | | | | | | Rewrite the parts of the page that were referring to QMake as the tool of choice. Favor CMake and Ninja. Pick-to: 6.10 Fixes: QTBUG-141358 Change-Id: Ie47d15b3385a25e3ce326b4e2c3b764c4333765a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* linguist docs: deprecate //= comments in documentationMasoud Jami2025-09-151-1/+0
| | | | | | | | | | | | | The documentation on how to write source code for translation briefly mentions //= metastrings without going into details. As the functionality of //= metastrings is not fully implemented and documented, and is mostly misunderstood and misused, it's deprecated to use this metastring. Task-number: QTBUG-139769 Pick-to: 6.10 Change-Id: If8d1601ffbfeffce924db1b2a996749a4c7ef33a Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Doc: Correct signal handler HowToAxel Spoerl2024-12-191-2/+6
| | | | | | | | | Use PMF based connect syntax. Add initialization of static members, to make sure copied code compiles. Pick-to: 6.9 6.8 6.5 Change-Id: Ib531f793de0dfd2f42083a5a0a4f6dea018166ed Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Correct license for documentation filesLucie Gérard2024-03-1931-31/+31
| | | | | | | | | | | | According to QUIP-18 [1], all documentation files should be LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 6.7.0 Task-number: QTBUG-121787 Change-Id: Idbbd9c9bc1780cf97c71398a3b118d5b371b0ca3 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Rename 'Qt Designer' to 'Qt Widgets Designer'Friedemann Kleint2024-02-191-1/+1
| | | | | | Task-number: QTBUG-122253 Change-Id: Ib7f38c711854389a54628703804c3fc285abb377 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Update section on static linking on LinuxKai Köhne2024-01-141-3/+5
| | | | | | Pick-to: 6.5 6.6 6.7 Change-Id: Ia6b98f83b6757e14b5080ffab15ba9833bd97689 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Doc: Mention retranslateUi() in source code translation pageAndreas Eliasson2023-09-131-0/+11
| | | | | | | | | | When using Qt Widgets with uic, inform the user of the ui.retranslateUi function. Also, add code snippet to clarify how to use the function. Fixes: QTBUG-110846 Pick-to: 6.6 6.5 Change-Id: I67a01fe5fbda47124396792bd2198bdf908838c2 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Mark the module as free of Q_FOREACH, except where it isn'tMarc Mutz2023-08-175-0/+10
| | | | | | | | | | | | | | | | | | | | | | The density of Q_FOREACH uses is moderate here, but too high for this author, unfamiliar with this code, to tackle in a short amount of time. But they're concentrated in just a few TUs, so pick a different strategy: Mark the whole module with QT_NO_FOREACH, to prevent new uses from creeping in, and whitelist the affected TUs by #undef'ing QT_NO_FOREACH locally, at the top of each file. For TUs that are part of a larger executable, this requires these files to be compiled separately, so add them to NO_PCH_SOURCES (which implies NO_UNITY_BUILD_SOURCES, too). NB: there are none such TUs in this module. Created QTBUG-115830 to keep track of this. Task-number: QTBUG-115830 Change-Id: I68c9394c04af68cab46480153a5601828565461a Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Docs: Update code snippet to use shadow buildSafiyyah Moosa2023-06-302-48/+8
| | | | | | | | | Removed unused doc/src/snippets/code/doc_src_emb-install.qdoc file. Task-number: QTBUG-113747 Change-Id: Ic707083289417a3636b840ccedae47122eb369db Pick-to: 6.5 6.6 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Make borderimage-defaults.qml snippet testableShawn Rutledge2023-05-161-6/+0
| | | | | | | Resizing the window resizes the BorderImage. Change-Id: I761cc3103416995c0fe5d996eeea6b006189e34b Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Doc: Replace mentions of deprecated macrosTopi Reinio2023-05-092-26/+1
| | | | | | | | | | | | | | Q_ENUMS() and Q_FLAGS() are deprecated in favor of Q_ENUM() and Q_FLAG(). Also, remove unused code snippets that use the old macros. Pick-to: 6.5 Task-number: QTBUG-113229 Change-Id: I42c47128ddcf0073ba3493a6c59e143f0e9753c6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Doc: Rewrite Qt for Linux/X11 - Building from Source pageKai Köhne2023-02-201-39/+0
| | | | | | | | | | | | | | | Adapt the structure of the Windows page by first detailing where to get the sources, and explicitly listing the required build tools. Inline code snippets, and use the \QtVersion macro to give the real path instead of relying on %VERSION%. Remove some outdated information. Pick-to: 6.5 Change-Id: Ic7cc60182a9f7f08d656e12ba76af3b4f0602b95 Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
* Doc: Fix name of qt-everywhere packageKai Köhne2023-02-202-10/+10
| | | | | | | | | | We don't have dedicated opensource and commercial packages anymore since years. Pick-to: 6.4 6.5 Change-Id: I6cb19493249e7d0362a3fcb2ca30b052e874c7db Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* macOS: Update example of how to retrieve the application bundle pathTor Arne Vestbø2023-02-171-8/+2
| | | | | | | Fixes: QTBUG-110742 Pick-to: 6.5 6.4 6.2 Change-Id: Ic81ea40caf9fe6b261f2536f11fa2b460b416aaa Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* qml/i18n: Mention LanguageChange event for C++ typesFabian Kosmale2023-02-081-0/+52
| | | | | | | | | | | | | | | | | | When QQmlEngine::retranslate refreshed all bindings, that conveniently worked also for C++ properties. However, that is no longer the case since Qt 6.2, which only refreshes actual translation bindings. As bindings cannot know that a C++ setter uses a translation macro/function, there needs to be a way to inform the engine about them. Promote event handling as the recommended approach in C++ types, which aligns with what needs to be done in a Widgets application. Task-number: QTBUG-102393 Pick-to: 6.5 Change-Id: I16b91fcea35331d300fd70756de8819740b5dcb4 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update uic documentation and command line optionsFriedemann Kleint2023-02-071-12/+0
| | | | | | | | | | | | Remove obsolete sections on Makefiles and point to the Qt Designer documentation for usage. Pick-to: 6.5 Task-number: PYSIDE-2191 Change-Id: Iaf377cd7ec4a2e1655825719b5dc8333507ef0af Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Doc: Consolidate internationalization documentationLeena Miettinen2023-01-253-36/+0
| | | | | | | | | | | | | | | | | | - Combine the "Internationalization with Qt" and "Internationalization and Localization with Qt Quick" topics - Add a "Localizing Applications" topic - Move information from the Qt Linguist Manual developer section to the new topics - Add a link to a YouTube video about localizing apps - Use active voice and present tense Fixes: QTBUG-71876 Change-Id: If2db1d4865e47a85e0b63adac326fc123ad65e50 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Adapt to rename of mime convertersVolker Hilsheimer2022-11-221-2/+2
| | | | | | | | QMacMime is now QUtiMimeConverter, and QWindowsMime is QWindowsMimeConverter. Change-Id: I14d93c483951110a5ee439499f02e865881f4634 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add more info about QX11Info alternativesLiang Qi2022-10-215-0/+100
| | | | | | | | Pick-to: 6.4 6.2 Fixes: QTBUG-103856 Task-number: QTBUG-103715 Change-Id: If66172bc4c7840a1c267c5d0d3ed4b49fee42af5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove section about translating application menus on macOSTor Arne Vestbø2022-10-211-19/+0
| | | | | | | | The information applied only to Carbon Pick-to: 6.4 Change-Id: Iee6d9e7afbd3846ed50a6030da3c1925d19a5ee4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Replace deprecated Q_WS_MAC define with Q_OS_MACOSTor Arne Vestbø2022-10-201-1/+1
| | | | | | Pick-to: 6.4 Change-Id: If9b07fe0f04fa525249d050cb14ffbab5cc8de8b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-07241-11764/+483
| | | | | | | | | | | | 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: Idfd176b7f7b077a5b7c66b7738dc9bcac94ab290 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Windows: Remove outdated information about VS linker & spacesKai Köhne2022-05-241-58/+0
| | | | | | | | This seems to work just fine, at least with CMake. Pick-to: 6.2 6.3 Change-Id: I37c9a15455f7da251da60840be48c13c39edc91c Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Replace uses of deprecated _qs with _sSona Kurazyan2022-04-261-2/+4
| | | | | | Task-number: QTBUG-101408 Change-Id: I011d5ed352298902158d0b1b89ad3b99b310fc83 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add Qt Quick changelog items to whatsnew63.qdocShawn Rutledge2022-04-041-0/+69
| | | | | | | | | | Amends 28dd0b133435e044224c3141265e14f2a2586efc. The process to generate these apparently didn't include reading ChangeLog entries to find the notable new features. Pick-to: 6.3 Change-Id: I3229755c1f797d700278bf1f9df63e3d410db450 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Fix typosKai Köhne2022-01-281-2/+2
| | | | | | | | Found by running codespell: https://pypi.org/project/codespell/ Pick-to: 6.3 Change-Id: Id0824821cb39fef8731d0f1837207178708f3620 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Update documentation on translationsFriedemann Kleint2021-08-311-4/+6
| | | | | | | | | Adapt to qtbase/74515a7a30b809a3ab0a2d67496e870ea3c872e6. Pick-to: 6.2 Change-Id: I200e8a6803a46deb064f84d312a15e888f5d4e6d Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Update macOS documentation for Qt 6Tor Arne Vestbø2021-06-212-3/+2
| | | | | | | Fixes: QTBUG-92276 Pick-to: 6.2 Change-Id: Ifd75f940384a16499d97084ad78d80efa6a72730 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix broken link to obsolete QFtpTasuku Suzuki2021-06-181-1/+0
| | | | | | Pick-to: 6.2 6.1 Change-Id: I3d746dd3f1cab2cf4ee0f4bf695f71cb8906384e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Update build instructionsJoerg Bornemann2021-04-011-1/+1
| | | | | | | | | | Remove -xplatform configure arguments and add -qt-host-path where necessary. Pick-to: 6.1 Fixes: QTBUG-92047 Change-Id: I2d9f7fff3a6353e7e41c667e35e202dc40bdf40e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Don't recommend deprecated QLibraryInfo::locationVolker Hilsheimer2021-03-251-1/+1
| | | | | | | | Point readers at QLibraryInfo::path instead. Pick-to: 6.0 6.1 Change-Id: I671c76bc58934b2de7ad84b10716ed36a3664aa8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* documentation: Do not use versioned QML importKai Koehne2020-12-0227-28/+28
| | | | | | | Pick-to: 6.0 Task-number: QTBUG-89033 Change-Id: I253319dc201d3144860ab344514375a60a7ddb11 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove snippets for widgets-tutorialKai Koehne2020-12-0129-927/+0
| | | | | | | | The documentation got removed in 9682ba54b Pick-to: 6.0 Change-Id: I42514b2ddcc54c7a8aad7779d34aca12378965fd Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove unused snippets from doc_src_installation.qdocKai Koehne2020-11-111-139/+0
| | | | | Change-Id: I4b0e1ed4c5233dcb4d4a5b779709e1025fc022e9 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* macOS: Update macos-building.html for Qt 6Kai Koehne2020-11-101-2/+2
| | | | | | | | | | | | | | | Advise to users to use cmake --build, cmake --install instead of make, make install. Also remove the mentioning of problems with parallel builds (is this still current)? Finally, remove the mentioning of the Fink / QMAKESPEC issue; The new Qt 6 build system doesn't use QMAKESPEC anymore. Change-Id: I5d1cee7d795c6b1d2cee022bc3049f6767561177 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove usage of deprecated QStandardPaths::DataLocationKarsten Heimrich2020-10-211-1/+1
| | | | | | | Task-number: QTBUG-87037 Change-Id: I86b05c0ef07fd34ec7b17f01269bc1939a7cc764 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: Simplify example for specifying overloaded signals/slotsSze Howe Koh2020-08-291-15/+2
| | | | | | | | | | | | | | | | | Keep qOverload<> only, which is arguably better than all the others: * QOverload<>::of is obsolete since Qt 6 requires C++17 * static_cast<> is harder to read * The explicitly-typed function pointer variable is arguably harder to read too: auto mySlot = qOverload<int>(&QLCDNumber::display); vs. void (QLCDNumber::*mySlot)(int) = &QLCDNumber::display; Change-Id: I6cba15bcf1b46b4fecd704b4d842deb4be5db81f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Example: Add the app icon setupVenugopal Shivashankar2020-06-151-24/+0
| | | | | | | | | | | | | The example's qmake setup includes the app icon config, which is dropped in the CMake setup for some reason. In addition, updated the app icon setup instructions to use this example as a reference instead of the snippet file. Change-Id: I12bb8b007904164226dc78f2a2e162b08c9003e1 Fixes: QTBUG-83696 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Add cmake instructions for app icon setupVenugopal Shivashankar2020-06-151-0/+24
| | | | | | | | | | Added CMake-specific app icon setup instructions for windows and macOS. Change-Id: I81378ba8cee010685811b34b4dee85fdbe2b2edf Fixes: QTBUG-83696 Pick-to: 5.15 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-092-4/+4
| | | | | | Task-number: QTBUG-84469 Change-Id: I2033b8fa36b2fdd6929a6d5571d67e52dffc2824 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Fix snippetPaul Wicking2020-04-241-0/+1
| | | | | | | | | | | The field sa_flags of the structure term is not initialized to zero, so SA_RESTART is in OR with whatever value was in the memory. It should be set to zero as already done for the structure hup. Fixes: QTBUG-83686 Change-Id: If4c2b68136fb0cab26af164bbdb461807b11ce70 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Levon Sargsyan <levon.sargsyan@qt.io>
* Merge remote-tracking branch 'origin/5.15' into 5.15.0Qt Forward Merge Bot2020-04-221-2/+2
|\ | | | | | | Change-Id: Ibac97219e1738afb001d4a6829e4ab7269378382
| * Update connects to QSocketNotifier::activatedMårten Nordheim2020-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | The int-overload will in some cases truncate the descriptor. So it's being replaced. Task-number: QTBUG-70441 Change-Id: I1cd7dd0a8064dc90b862b41c969d270ac707439f Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Make docs encourage readers to query locale rightMiłosz Kosobucki2020-04-211-1/+1
|/ | | | | | | | | | | | | | | | | Currently the example shows the usage of "filename" + QLocale::name() which will not work correctly for users with different locale and display language. Even the QTranslator::load() docs discourage using it in this way. This approach is copied by users of Qt. For example in KDE: https://github.com/search?q=org%3AKDE+%22%2B+QLocale%3A%3Asystem%28%29.name%28%29%22&type=Code We should follow the best practice in the first place the user is going to look at when working with i18n in Qt. Hopefully, with this change the incorrect code will slowly die out. Change-Id: I881f50f39740632bbd4640495270aae22bd44d0d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Use Qt::SplitBehavior in preference to QString::SplitBehaviorv5.15.0-beta2Edward Welbourne2020-03-021-1/+1
| | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I8d4c9f4f278ccc42ab89ffe3334e4c29ea540661 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Revert "Use networkError instead of error"Timur Pocheptsov2020-02-241-2/+2
| | | | | | | | This reverts commit 58c17ea6a79d682da976815901830839ddc9cec0. Naming in QProcess is considered to be the correct one and the rule. Change-Id: I79566d5f601dbe1975ed8bcac19874a27fa83b21 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-211-4/+0
|\ | | | | | | Change-Id: I4d233e45348a0c3898ec999d8f9afcbc944d785a
| * Remove dead qmacnativewidget snippetTor Arne Vestbø2020-01-201-4/+0
| | | | | | | | | | Change-Id: I61e88de67cada659287f8a1dd341dc4fec43be3b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Use networkError instead of errorTimur Pocheptsov2020-01-151-2/+2
|/ | | | | | | | | It was deprecated. Task-number: QTBUG-80369 Change-Id: I8374abca51d8b61e33f2b9d74048916dcb9c615b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-161-1/+2
|\ | | | | | | Change-Id: I6b985ad066151f8c2baaa37066dc58bdc5f5a55d