summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* Modernize QMessageBox documentation and exampleTor Arne Vestbø2022-11-184-0/+0
| | | | | | Change-Id: Iebcdf53646f1a42c327414edf21ac93a7d1c0a56 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Normalize page namesKai Köhne2022-11-021-1/+1
| | | | | | | | | | | | | | | qdoc does enforce lowercase file names for .html pages, and also replaces underscore with a dash. Make sure that the original \page name already is normalized, so that it's easier to search. This was done by find . -name "*.qdoc" -exec perl -p -i -E "s/\\\page (.*)/\\\page \L\1/ && s/_/-/g" {} ; Pick-to: 6.4 Change-Id: Ib50b85af8ffd985edf06856266eefdebf8b328a3 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Luca Di Sera <luca.disera@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Layouts docs: pass parent widget in the ctorAhmad Samir2022-10-215-18/+13
| | | | | | | | | This is a follow up from commit 1e904ab342c1aaa; changing more documentation to pass a widget * in the ctor of a layout, rather than creating a parent-less layout then calling setLayout(). Change-Id: I4fc59c6cfa46ccd279a153acd67335a6daf22ff9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-113-4/+4
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Style sheets: add placeholder text color property for edit widgetsEirik Aavitsland2022-09-292-1/+28
| | | | | | | | | The placeholder text was given its own QPalette color role in Qt 5.12, but there has been no way to specify it from a Qt style sheet. Fixes: QTBUG-93009 Change-Id: If58ca844c19c65b7eee14c6d5730a4ba27640c33 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update the snippet for QFileDialog::saveFileContentMikolaj Boc2022-08-261-1/+3
| | | | | | | | | The snippet for QFileDialog::saveFileContent is wrong - the parameters used are in wrong order. Pick-to: 6.4 6.2 5.15 Change-Id: I022e8ed2ef5aeea5a44e9b10ac211893a3e24c0f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-238-8/+8
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Doc: Format certain operators in textPaul Wicking2022-08-231-1/+1
| | | | | | | | | | Use correct text formatting; this ensures e.g. the decrement operator isn't converted to an en dash in the docs. Apply to increment operator docs also for consistency. Task-number: QTBUG-105729 Change-Id: I5f126b90bc1d1b91d86e1f87c9b17a583841adb6 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Documentation: Fix "Using Model Indexes" in Model View Programming guide to workFriedemann Kleint2022-08-092-29/+40
| | | | | | | | | | | | | The code introduced by 54d5ca0c2766e915c960fa437cee6c20a324c1a7 did not work since the variables parentIndex/numRows were local to the lambda and the outer code would not wait. Move the widgets population into the lambda to fix this. Modernize the remaining code a bit. Pick-to: 6.4 6.3 6.2 Change-Id: I2a09878987df9edb9ff04f0ac4ad82af1a8b52c8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-038-0/+24
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Styles: fix typos in the docLaszlo Papp2022-07-151-4/+4
| | | | | Change-Id: I4b4ee0be40f7cef8bae41d763eaf4c1822e91c43 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CustomStyle doc: fix code indentationLaszlo Papp2022-07-141-1/+1
| | | | | Change-Id: I8ef0ff5a499f796ebf76447caab27ff6b2556570 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Add qthelp dependency to gui and widgetsLuca Di Sera2022-06-221-1/+1
| | | | | | | | | | | | | | | | The documentation for both gui and widgets defines members of the "helpsystem" group, which definition is given in qthelp. Due to recent changes in QDoc that automatically link a class page to its owning group, it is now required for those project to be dependent on qthelp, so that it is possible to retrieve the necessary linking information for the group definition. Hence, such a dependency was added. Change-Id: Id9399e76bbe10fb9ae0c05d637006b5cdc0b742b Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix typos in docs and commentsKai Köhne2022-06-151-1/+1
| | | | | | | | | 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-16145-6612/+290
| | | | | | | | | | | | | 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>
* QtWidgets: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-021-8/+10
| | | | | | Task-number: QTBUG-98434 Change-Id: I310ea8f19d73a79d985ebfb8bfbff7a02c424360 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtWidgets: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-262-3/+3
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I133b80334b66e0a5ab9546dd8e1ff0631e79601e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Reorganize sections structure in Qt Widgets landing pageAndreas Eliasson2022-03-221-20/+21
| | | | | | | | | | Also, use the global include snippets for the 'Using the Module' section. Task-number: QTBUG-100369 Pick-to: 6.3 Change-Id: Ib9e32dd48689879c91c7c307f8cf0f01dc478efe Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Replace deprecated QColor::fromString in tests and documentationVolker Hilsheimer2022-03-211-1/+1
| | | | | | | | Don't use deprecated methods in tests, and don't refer to them in documentation. Change-Id: I110480742d9a7b9b0a2e194e3fe610208c1e07da Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Document change to style sheet selectors for enum propertiesVolker Hilsheimer2022-02-201-0/+21
| | | | | | | | | | | | | | The change is presumably an unintentional side effect of QVariant and QMetaType system changes in Qt 6, but it arguably is a good change. Document it in the porting guide, while evaluating whether (and figure out how) we want to support integer values as well. Pick-to: 6.3 6.2 Task-number: QTBUG-99642 Change-Id: Id1589c594bcdc2afe5c4fd0e47a158cd5e03e52f Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Doc: Remove "Docs about UI Design" book overviewKai Köhne2022-01-192-81/+4
| | | | | | | | | | | | | | Recommending a Qt 4 book in Qt 6 documentation tells us something about how much we maintain the list :) The other books might still be good sources. Anyhow, the chances of a customer looking exactly in this place to learn good books about icons are not very high. So let's just ditch the page, and use external links instead. Pick-to: 6.3 Change-Id: I8013a5ab9d3416fe795f4aaed647e26db79508a1 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Doc: Remove mentioning of Fowler bookKai Köhne2022-01-171-10/+0
| | | | | | | | | It is out of print since years, and probably quite dated by now (released 1997). Pick-to: 6.3 Change-Id: I1653eb404713c15d70b8a15858e8c7d12b2e71cb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiomKai Köhne2021-12-092-2/+2
| | | | | | | | | | Using REQUIRED as a prefix instead of suffix works better with OPTIONAL_COMPONENTS, and is also the order in the CMake manual. Task-number: QTBUG-98867 Pick-to: 6.2 Change-Id: I1ab68408b95d8edf06272a3b9fceccd8d8e597fc Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Doc: Enable qdoc warning count limitVenugopal Shivashankar2021-10-211-0/+3
| | | | | | | | This should restrict changes that introduce new warnings. Change-Id: I7e4b5d9d5d84b7c336509c380bc7e6d86e360f4a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Mention a change to QDateTimeEdit::setDateTime()Edward Welbourne2021-10-161-1/+13
| | | | | | | | | | | I neglected to record the change in the Qt 6 changes documents that help folk migrate from Qt 5. This is a follow-up to commit 2a653fde48f7312ccd2f792d72d305061b410ae3 Fixes: QTBUG-97493 Pick-to: 6.2 6.2.1 Change-Id: Ie496fdd05759eeeac4c7610db40ab6745b5e0640 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix usage of \summary macroTopi Reinio2021-10-121-1/+1
| | | | | | | | | The macro takes only one parameter, sentences must be wrapped in {}. Pick-to: 6.2 Fixes: QTBUG-97441 Change-Id: I7177548a32a67d720c2b551d16c09d898b0fda51 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* widgets: Fix typos in documentationJonas Kvinge2021-10-122-3/+3
| | | | | | Pick-to: 5.15 6.2 Change-Id: I6b77f0ec043d08da3b7958d780dce9595daf97a6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Doc: Make it explicit when CMake API is definedKai Köhne2021-10-052-0/+7
| | | | | | | | Task-number: QTBUG-96239 Pick-to: 6.2 Change-Id: Iaa99024f98f5422aa39f148a89594186b40344bf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Add summary to CMake commandsKai Köhne2021-10-041-1/+1
| | | | | | | | | | | | For normal \page elements, \brief is just showing in the \generatelist or \annotatedlist commands. Make sure the description is also visible in the actual CMake command/variable/property page by defining a \summary macro. Pick-to: 6.2 Change-Id: I12bc854d547059a2f6309a5922bb0b2a36d4e41c Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Partially modified to use C++11 standard nullptrchenbin2021-09-061-1/+1
| | | | | Change-Id: I0542c47d1979235206005bf603822b6ea415f2da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Remove unsupported customFiltersKai Köhne2021-09-031-4/+0
| | | | | | | | | | | customFilters defined in .qdocconf are not supported anymore by Qt Assistant since Qt 5.13. Therefore remove them from all .qdocconf files, also to avoid cargo-culting them to new help modules. Task-number: QTBUG-95987 Change-Id: I664391460637d2e859348da0338e1a4a3ee9f570 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Add global \versionlessCMakeCommandsNote qdoc macroJoerg Bornemann2021-08-231-3/+2
| | | | | | | | | | | | | | When documenting a CMake command, document the unversioned command 'qt_foo' and use '\versionlessCMakeCommandNote qt6_foo' to refer to the versioned command. This avoids duplicating the command signature. Use the new macro where applicable. Pick-to: 6.2 Task-number: QTBUG-95796 Change-Id: I2e4180fbda0b89acf3d8c036459f591eb2f46475 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Implement missing support for 'em' and 'ex' lengths in style sheetVolker Hilsheimer2021-08-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The Qt style sheet reference claimed that Length properties can be specified in 'em' or 'ex' units, but that was never implemented. Add the missing implementation. Since the sizes depend on the size of the font of the current element, we cannot convert the units in the CSS parser, but have to do so in the QRenderRule constructor, where we can make a decision about which font to use if the style sheet itself doesn't specify a font. Fall back to the widget font if possible; otherwise it will be the application default font. The implementation translates em into QFontMetrics.height, identical to what is already done in the QCssParser. This is in line with the CSS specification, but contradicts our previous documentation which stated that 'em' means "width of M". Fix the documentation. Fixes: QTBUG-8096 Pick-to: 6.2 Change-Id: I145e2504ae3b19101a0d0dd63653466b6c2cec1d Done-with: Cristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: fix QStyleOptionMenuItem::menuHasCheckableItems typoJeremy Katz2021-08-101-1/+1
| | | | | Change-Id: I2553f3e799e57e688ae98090e34f30122fea1142 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Documentation: Remove section advertising AmazonFriedemann Kleint2021-06-281-13/+0
| | | | | | Pick-to: 6.2 6.1 5.15 Change-Id: Ibf61cdf4ccb08c00c74c88e66aac200971be62d1 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add note about the risk of setting min-width/height in a style sheetVolker Hilsheimer2021-05-071-2/+8
| | | | | | | Task-number: QTBUG-86677 Pick-to: 6.1 5.15 Change-Id: I1e5e10ee79d80fee40d04afe439489d6ce16a43e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Document change to QAbstractItemView::viewOptions in porting guideVolker Hilsheimer2021-04-041-0/+8
| | | | | | | | | | | We couldn't deprecate and add the replacement in 5.15, so list it explicitly here. Amends c501e09efacb8a60deb41f85f3402f6f4c041d95. Pick-to: 6.0 6.1 Change-Id: I174a7b6214cd8b9579b029ebf57e4d5b2e28e574 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Doc: Fix qdoc warnings on snippet filesNico Vertriest2021-03-222-1/+4
| | | | | | | | | qtwidgets-index.qdoc:123: (qdoc) warning: Cannot find file to quote from: 'snippets/snippets.pro' qtwidgets-index.qdoc:123: (qdoc) warning: Unexpected '\snippet (//! [qmake_use])' Task-number: QTBUG-90662 Change-Id: I702b685e7cd9c34b5a07480ecb99e913ce250d70 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Change section titles that cause bad linksPaul Wicking2021-03-111-3/+3
| | | | | | | | | | | Section titles are valid targets for QDoc's autolinker. When they are identical to other valid link targets, such as for example a class, these sections may cause invalid links. Pick-to: 6.0 6.1 Fixes: QTBUG-91141 Change-Id: Ie9a6258d2bf83932335976d8c0b5fc59f2028ae5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix signature of canDropMimeData used in code snippetAlbert Astals Cid2021-03-042-2/+2
| | | | | Change-Id: I9026e11630651e740282466551ad78883a0421ec Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Port the snippet project setup to CMakeVenugopal Shivashankar2021-02-108-2/+61
| | | | | | | | Change-Id: I411e58e94752f3b2d0a3e8aac0ab7c4c2272db89 Fixes: QTBUG-89826 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QStyle: add name() to return the name of the styleChristian Ehrlicher2021-01-141-16/+8
| | | | | | | | | | | | Currently there is no way to get the name of the current style to e.g. create a QProxyStyle for a specific widget only. Therefore add QStyle::name() so QProxyStyle(const QString &) can be called without hard-coding the style name. Remove an unused doc snippet as drive-by. Fixes: QTBUG-8004 Change-Id: I466c5e870a5392b238365bdc930f6a2ecee50cdb Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-0718-99/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Doc: Fix broken link in stylesheet examplesNico Vertriest2020-12-231-2/+4
| | | | | | Task-number: QTBUG-89211 Change-Id: Idde01e22dd57c37c78d8c86305d047562e5c1f64 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix various documentation warningsTopi Reinio2020-11-301-1/+1
| | | | | | | | | | | | | - QList iterators are now nested classes inside QList. - Drop reference to Qt OpenGL Widgets landing page, there is no such page. - Fix typos and linking issues. Fixes: QTBUG-86295 Pick-to: 6.0 Change-Id: I964843deb81aa55ff8ddb9a1c2b004cb72e68de9 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Use explicit linkage with target_link_librariesKai Koehne2020-11-301-1/+1
| | | | | | | | | | | | | | The Professional CMake book suggests always using explicit linkage with target_link_libraries, so let's use that. Whether to use PUBLIC or PRIVATE depends on the context. But let's be conservative and advise on using PRIVATE by default. Task-number: QTBUG-88935 Pick-to: 6.0 Change-Id: I12b80ee85be9f6916f1e4dea6b1c9cb29e03c20f Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Rename Application ExampleVolker Hilsheimer2020-11-261-1/+1
| | | | | | | | | | 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: Update CMake functions in Qt Widgets for Qt 6Kai Koehne2020-11-233-80/+12
| | | | | | Pick-to: 6.0 6.0.0 Change-Id: I4110e8695c75c40cec6f94bb94879b07282b29d3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix x-height name in stylesheet docsFlorian Bruhin2020-11-171-1/+1
| | | | | | | | | | | The *height* of an x being called "ex width" makes no sense. Also, it seems like this measurement is typically called "x-height" rather than "ex height", see e.g. https://en.wikipedia.org/wiki/X-height Pick-to: 5.15 5.12 Change-Id: Id8e2c1aa9be1a4a60e667a076486777d34f1e76d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Update landing pages and module pages in qtbaseJerome Pasion2020-11-171-0/+2
| | | | | | | | | | -Qt SQL, Qt D-BUS, Qt GUI, Qt OpenGL, Qt Widgets, Qt Test, Qt Concurrent, Qt XML, Qt Network, Qt Core -language edits for consistency, add links Task-number: QTBUG-87155 Change-Id: Ic61350c9fa15090c802a42d8e9116219591eba73 Reviewed-by: Paul Wicking <paul.wicking@qt.io>