summaryrefslogtreecommitdiffstats
path: root/src/gui/doc
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Improve opening description of Qt's Paint SystemDheerendra Purohit2025-06-081-2/+3
| | | | | | | | | Clarified the Paint System introduction to better convey its purpose and highlight its flexibility across different surfaces. Fixes: QTBUG-136487 Change-Id: Ib636087b9bae4d08541566145c4a0943dccb5432 Reviewed-by: Axel Spoerl <[email protected]>
* Remove docs claiming QColormap is involved in mapping colors to displayTor Arne Vestbø2025-06-031-2/+1
| | | | | | Change-Id: Iebf949d91379fff903b229c631b97a3c8a9ad03a Reviewed-by: Paul Olav Tvete <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
* Doc: Enable automatic linking to sources on code.qt.ioTopi Reinio2025-05-271-0/+3
| | | | | | | | | | | | Since 6.10, QDoc is capable of generating links to the declaration in the source code for each documented C++ API entity in their `Detailed description`. Add the required configuration to enable this feature in online documentation builds. Change-Id: Iaafabc5aea50a6cd72549bb1c04007bb4de498ca Reviewed-by: Paul Wicking <[email protected]>
* QIcon: document the support for icon fontsVolker Hilsheimer2024-12-032-0/+21
| | | | | | | | | | | | Add a C++ snippet that shows how to use a named glyph from an icon font, and add a QML snippet file that shows how to change the icon based on the state of a tool button. [ChangeLog][Gui][QIcon] QIcon can now generate icons from the named glyphs of an icon font. Change-Id: I1179ed93774c2c209094fffb910b2e06cbe2f572 Reviewed-by: Mitch Curtis <[email protected]>
* Add Qt::Orientations based flip and flipped functionsAllan Sandfeld Jensen2024-11-291-1/+1
| | | | | | | | Is easier to read and more bool-trap safe. Old form header deprecated from 6.10 Fixes: QTBUG-129575 Change-Id: Id785b9ce159007ce745c04120b2112c8bb9b0802 Reviewed-by: Volker Hilsheimer <[email protected]>
* Add QPainterStateGuardChristian Ehrlicher2024-11-281-0/+54
| | | | | | | | | Add QPainterStateGuard as a small RAII helper class to avoid unbalanced QPainter::save()/restore() calls. Change-Id: I618a5d720b7bc9267a0fbac7dcc90e61f5d9cefd Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: David Faure <[email protected]>
* Doc: Remove usage of defunct QDoc commandPaul Wicking2024-08-283-14/+0
| | | | | | | | | | | | | | The QDoc command `\tableofcontents` was rendered useless by a change more than a decade ago. Remove the use of `\tableofcontents` as it serves no purpose, and ensure that the surrounding context still makes sense for the reader, by removing preceding text that refers to a non-existing table of contents, such as `Contents:`. Task-number: QTBUG-128173 Pick-to: 6.8 Change-Id: Ibb5a6af0e80f70fa487cdf6a7e38009a9ef60cbf Reviewed-by: Safiyyah Moosa <[email protected]> Reviewed-by: Venugopal Shivashankar <[email protected]>
* doc: Add a note about the difference between block/span propertiesEskil Abrahamsen Blomfeldt2024-08-191-0/+5
| | | | | | | | | | | | | | QTextDocument has different formatting options for spans and blocks, which means that some CSS properties will be ignored if applied to a span, even though they might be respected by a full-blown web browser. Since this can be surprising to users, we add a note about it to the overview of supported HTML. Task-number: QTBUG-127457 Change-Id: I55ccb039849d3ce55b9bfb8be21b6e8d276b86cd Reviewed-by: Eirik Aavitsland <[email protected]>
* Docs: Organize topics in the qtbase repoAlexei Cazacov2024-08-132-1/+46
| | | | | | | | | | This commit organizes the articles, so they: - have a reasonable tree structure - can be navigated through the topic tree in the Qt Creator help viewer Task-number: QTBUG-127046 Change-Id: I66f2b131b8aacc887b35a770e51c1425431dffb5 Reviewed-by: Topi Reiniö <[email protected]>
* Doc: Specify correct target_link_libraries item for QRhiPaul Wicking2024-08-121-0/+1
| | | | | | | | | | | Use the new `\qtcmaketargetitem` QDoc command to specify the correct `target_link_libraries` item for items that belong to the new module. Pick-to: 6.8 Fixes: QTBUG-121855 Fixes: QTBUG-125994 Change-Id: I76a6ab749fdb349cc014f40bc7e548a0344bc50d Reviewed-by: Topi Reiniö <[email protected]>
* Add support for VRSLaszlo Agocs2024-08-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The basic Metal plumbing for letting an MTLRasterizationRateMap through is important for Vision Pro, that seems to rely heavily on VRS to reduce the GPU load via eye-tracked, dynamic foveation. Metal's approach is kind of different than everyone else. For a more complete, forward looking story, introduce support for some of the D3D12 and Vulkan VRS features. (these seem to be identical feature-wise, with Vulkan essentially copying D3D, just with a lot more convoluted API) A certain fragmentation is however inevitable. This way we support: - setting a per-draw rate (say I want to draw this mesh with 4x4 rate, i.e. 4x reduced resolution both horizontally and vertically). This is supported with D3D12/Vulkan, and could also be supported with the Qualcomm OpenGL ES extension, although that's not currently implemented. - setting a texture-based rate map, D3D12/Vulkan style. This implies starting to support R8_UINT textures since R8_UNORM, while the difference isn't necessarily relevant here, will be rejected by some APIs. This is done by setting a QRhiTexture on a QRhiShadingRateMap (a new lightweight, wrapper-style object that does not do much on its own, just contains either a texture or some other native object) - setting an MTLRasterizationRateMap on a QRhiShadingRateMap. This is only supported on Metal, naturally, and is realized by an overload of createFrom(). Conversely, setting a QRhiTexture (or attempting to set a per-draw rate) will not work with Metal. We do not offer ways to create a rate map directly via Qt, due to the underlying API differences. So for the user this involves either uploading a Grayscale8 or similar QImage into an R8UI QRhiTexture, or by setting up an MTLRasterizationRateMap directly with Metal and passing that in to the QRhiShadingRateMap instead of a QRhiTexture. We also do not care about the bizarre 'render to a texture, get a buffer with scale rates, and then do a scaling pass using the buffer and MSL intrinsics in the shader' approach of Metal. For now we assume that in case of the Vision Pro this is taken care of by the XR compositor, and is not something the applications (Qt) implements. Some D3D12/Vulkan VRS features are left as potential future enhancements. For example, when it comes to combining the two rates, we always do MAX, there is no API to control the combiners. The third mode of D3D12/Vulkan VRS, per-triangle (writing to a special variable in the vertex shader) is not planned to be supported now or in the future. The Vulkan backend gets quite a lot of changes, mainly due to the difficulty of dealing with extensions in a portable and robust manner in that API, and the API versioning design mistakes in Vulkan 1.1 and beyond. Now both swapchain and texture render pass objects go through vkCreateRenderPass2, when supported, but the KHR variant still, not the 1.2+ core functions, in order to play nice with Vulkan 1.1 and the Android ecosystem. Some QRhi docs are enhanced, e.g. around QRhiRenderPassDescriptor, since as the manual test demonstrates, dynamically taking VRS into use in a scene involves certain steps (new/compatible QRhiRenderPassDescriptor is needed, rebuilding the render target) that are not trivial. (these are just the usual consequences of Vulkan's VkRenderPass permeating everything in the rendering engines) The manual test can be used to exercise both per-draw and image-based VRS with D3D12 and Vulkan. It also includes a limited example of setting up a rate map with Metal (but the test app does not implement the special scaling) A number of things, such as operating with MSAA enabled or using VRS combined with multiview are not currently exercised by the test app, and are left as a future exercise to verify. Task-number: QTBUG-126297 Change-Id: I5210f4cff6b8360b6bb47cdbe8d9caee1c29b8a5 Reviewed-by: Andy Nichols <[email protected]>
* Doc: Fix broken linksSafiyyah Moosa2024-06-261-1/+1
| | | | | | | | | | | | | | | | | This commit fixes: Broken URL (404): 'https://doc.qt.io/qtcreator/creator-autotest.html' from qtest-overview.html https://doc.qt.io/qtcreator/creator-autotest.html is replaced with https://doc.qt.io/qtcreator/creator-how-to-build-and-run-tests.html. Broken URL (404): 'http://www.opengl.org/wiki/Tessellation_Shader' from qopenglshaderprogram.html 'http://www.opengl.org/wiki/Tessellation_Shader' is replaced with https://www.khronos.org/opengl/wiki/Tessellation Task-number: QTBUG-126281 Fixes: QTBUG-126502 Pick-to: 6.8 6.7 6.5 Change-Id: Ifda1258a6500adcfa3fe861135ab98082ed2df10 Reviewed-by: Topi Reiniö <[email protected]>
* Doc/QIconEngine: fix comment about virtual_hook()Christian Ehrlicher2024-06-041-2/+2
| | | | | | | | | | QIconEngine::scaledPixmap() and isNull() are now virtual functions which can be reimplemented by the icon engines so the comment was out of date. Pick-to: 6.8 Change-Id: I308446dade1da9edeef5c554db146443660b4761 Reviewed-by: Volker Hilsheimer <[email protected]>
* Add configure feature for MetalTor Arne Vestbø2024-03-191-1/+1
| | | | | | | Simplifies maintenance of code paths that rely on Metal. Change-Id: I1d1f705fffc14dbafde346eeb555b43be6d5be54 Reviewed-by: Alexandru Croitor <[email protected]>
* Doc: QRhi correctionsPaul Wicking2024-02-091-0/+17
| | | | | | | | | | | | | | * There's no convenience header for the `QRhi` class, so add the `\inheaderfile` command to specify the correct include. * The `QRhi` class belongs to the `QtGuiPrivate` module; use the correct name. * QDoc needs to know about the QtGuiPrivate module. Add basic documentation for the private module. Task-number: QTBUG-121855 Task-number: QTBUG-121991 Change-Id: I1ffd729a5f9c928f4cf91ce7127f40c7733fc42f Reviewed-by: Topi Reiniö <[email protected]>
* Change license of .qdoc filesLucie Gérard2024-02-012-2/+2
| | | | | | | | | | | According to QUIP-18 [1], all .qdoc 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 Change-Id: I4559af21fc9069efa9bf0cbd29c5e86cfdac9082 Reviewed-by: Kai Köhne <[email protected]>
* Remove foreach snippets from the documentationKai Köhne2024-01-161-22/+0
| | | | | | | | | | | | | | | We don't recommend foreach anymore, and have in fact adapted two snippets already to use for(), but missed the documentation text. In any case, it feels a bit weird to give an example how to iterate over QStringList in each of these methods, so we might as well just remove this part. Pick-to: 6.6 6.7 Change-Id: If8744e48961661ad518f5f24781c38f371d981bc Reviewed-by: Jaishree Vyas <[email protected]> Reviewed-by: Giuseppe D'Angelo <[email protected]>
* Doc: Rearrange best practices and how to documentationJaishree Vyas2023-12-281-1/+0
| | | | | | | | | | Change the best practices to how-tos, which are categorized now on a new page. Fixes: QTBUG-118044 Pick-to: 6.7 6.6 6.5 Change-Id: I78dba2a1fde03b346f110ecd54e11485a0869540 Reviewed-by: Leena Miettinen <[email protected]>
* Turn the "concentriccircles" example into snippets, update screenshotVolker Hilsheimer2023-12-142-1/+19
| | | | | | | | | | | | | The example has a lot of code and documentation, but in essence shows how to use float-based QPainter APIs and how to set a render hint. That is two lines of code, which we can show as snippets. Update the screenshot of the example with a higher-resolution version. Pick-to: 6.7 6.6 Fixes: QTBUG-119983 Change-Id: Iafcb813dff6ab8c269176f7994c95947ebf5e559 Reviewed-by: Eirik Aavitsland <[email protected]>
* QIcon: turn platform engines on by defaultVolker Hilsheimer2023-12-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | They are used when an icon is constructed via QIcon::fromTheme, unless an application-defined theme provides the requested icon. Update the documentation. For now we don't provide a way to "opt out". This might change, depending on the feedback during the Qt 6.7 beta phase. [ChangeLog][QtGui][QIcon] Qt now has implementations of native icon engines for macOS, iOS, Windows 10, Windows 11, and Android. These engines provide access to the native icon libraries and fonts, mapping standard icons to the corresponding native icon asset. Icons from application-defined themes take precedence, but the last-resort fallback icon passed as the second parameter into the QIcon::fromTheme(QString, QIcon) overload is only used if the icon is not available from the native library. See the QIcon documentation for details. Change-Id: I618e5c137c40f8e6309c0e4d4219a5a2759a475d Reviewed-by: Tor Arne Vestbø <[email protected]>
* QIcon: Clean up documentationVolker Hilsheimer2023-12-071-9/+11
| | | | | | | | | | | | | Structure the overview documentation a bit more around the different ways to create a QIcon (from resources or theme). Replace the use of QIcon::pixmap with a call to QIcon::paint in the example widget, and tighten the High-DPI documentation a bit. This does not add any mentioning of the upcoming "native icon library" support. Change-Id: I9cc7eab1fb5d134e5119660b534c2efdb0b03730 Reviewed-by: Tor Arne Vestbø <[email protected]>
* Doc: Fix warnings and linking issuesTopi Reinio2023-10-092-3/+6
| | | | | | | | | | | | | | | | | | | | Remove or replace links to examples that were removed or moved under manual tests. Replace code snippets that were quoting the now-missing examples. Fix documentation of QSet::removeIf(). Fix typo in documentation macro: Unknown command '\examplecateogry'. Add qtopengl, qtshadertools dependencies to Qt Widgets documentation project to enable correct linking to those topics. Mark all documentation sets in qtbase as free of warnings. Pick-to: 6.6 6.5 Change-Id: I058cd5f2063aa933ea310bceff906f05422a7cb2 Reviewed-by: Topi Reiniö <[email protected]>
* Doc: Highlight some examples for the "Graphics & Multimedia" categoryKai Köhne2023-10-091-0/+2
| | | | | | | Task-number: QTBUG-117211 Pick-to: 6.5 6.6 6.6.0 Change-Id: I9ebe20719ad96b0d9ced40745eb6ee09d3e6fb40 Reviewed-by: Andreas Eliasson <[email protected]>
* rhi: Fix intro doc snippet with VulkanLaszlo Agocs2023-10-051-1/+3
| | | | | | | | | The QVulkanInstance must outlive the QRhi (if Vulkan is used). Otherwise subtle problems may pop up upon application exit. Pick-to: 6.6 Change-Id: Ia7074c7f53633d51cf3bbdcc84e7f578214d9648 Reviewed-by: Laszlo Agocs <[email protected]>
* Doc: Fix QIcon documentationTopi Reinio2023-10-021-1/+10
| | | | | | | | | | | * Move \externalpage topics to external-resources.qdoc, as that command cannot be embedded in other topics. * Fix references to non-existent function fallbackIconTheme(). Pick-to: 6.6 Change-Id: I5d08206c53aea9c2d4c6fddf5d04df187b01ef53 Reviewed-by: Tor Arne Vestbø <[email protected]>
* Doc: All overviews list categorizationJaishree Vyas2023-09-111-1/+1
| | | | | | | | | | | | The \generate list names are added for each categorized section with some explanation. Here, calling the overviews as explanations-(name of the section). The idea is to give general terms instead of specific phrases like 'core' etc, for better understanding. Task-number: QTBUG-115347 Pick-to: 6.5 6.6 Change-Id: I673e38c0e9193b7f7d54008bfcf82c2d3a10be3f Reviewed-by: Topi Reiniö <[email protected]>
* Add QRhiWidgetLaszlo Agocs2023-08-141-0/+12
| | | | | | Task-number: QTBUG-113331 Change-Id: I8baa697b4997b05f52acdee0e08d3c368fde5bc2 Reviewed-by: Andy Nichols <[email protected]>
* doc: Fix QVulkanFunctions code snippetLaszlo Agocs2023-07-301-6/+4
| | | | | | | | | | | | Showing code that cannot possibly compile is bad practice. (vkAllocateCommandBuffers is in QVulkanDeviceFunctions, not QVulkanFunctions) Rather use a member function that is actually in QVulkanFunctions. Pick-to: 6.6 6.5 6.2 Change-Id: I3063a8a229152144ce866e915eb4c14ecc58e9ce Reviewed-by: Laszlo Agocs <[email protected]>
* Doc: List of all Qt overviews which are now termed as explanationJaishree Vyas2023-07-191-1/+1
| | | | | | | | | | | | | The autogenerated list of overviews was adding the \group command which included all the groups instead of overviews. The idea here is to categorize the overviews later on once we have the list of all overviews. Task-number: QTBUG-114762 Pick-to: 6.5 6.6 Change-Id: I3cf53886be277abc86b5ec54d399cd6933fbe882 Reviewed-by: Kai Köhne <[email protected]> Reviewed-by: Leena Miettinen <[email protected]>
* rhi doc: Make getShader in the snippets more compactLaszlo Agocs2023-07-121-3/+1
| | | | | | | | One line is better than three. Pick-to: 6.6 Change-Id: Ib738ec18b51accead3897b450b26207b3fba87d8 Reviewed-by: Laszlo Agocs <[email protected]>
* Add porting documentation for QMacPasteboardMime/QWindowsMimeVolker Hilsheimer2023-07-121-0/+34
| | | | | | | Task-number: QTBUG-93632 Pick-to: 6.6 Change-Id: I38294aef304adea86ecf5fbb118024037afedfe8 Reviewed-by: Venugopal Shivashankar <[email protected]>
* Use a global value for warning limit when testing documentation in CITopi Reinio2023-06-271-3/+0
| | | | | | | | | | | | | | | | | | | The most common limit for the maximum number of allowed documentation warnings is zero. Use a global value for 'warninglimit', adopted by all Qt module documentation projects that include the configuration from qtbase/doc/global. This allows for a temporary increase of the limit across all modules as needed - for example, when updating the QDoc binary that the CI provisions to a version that introduces new types of documentation warnings. Increase this base limit temporarily to 10 to help re-enable documentation testing in CI as it's currently disabled. Task-number: QTBUG-113326 Change-Id: I8b66951ca9324bcfaec3b5a7ec2cff544c62feb0 Reviewed-by: Paul Wicking <[email protected]>
* Doc: Clarify that the rich text engine has limited support for HTML tagsTopi Reinio2023-06-261-1/+5
| | | | | | | Fixes: QTBUG-108482 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: I10983c5737b8c4453e79467e5a41fd6dfe11069f Reviewed-by: Tor Arne Vestbø <[email protected]>
* Doc: Fix documentation warnings for Qt GuiTopi Reinio2023-05-301-0/+1
| | | | | | | | | | | | | | | | | | | * Fix file quoting in RHI Window example * Add missing \inmodule commands for QRhi Classes * Add missing dependency to qtshadertools * Remove documentation for non-existent overload of QRhiGraphicsPipeline::setTargetBlends() Other fixed warnings: src/gui/rhi/qrhi.cpp: * warning: clang couldn't find function when parsing \fn void setUsage(UsageFlags u) * warning: clang couldn't find function when parsing \fn virtual bool QRhiSwapChain::isFormatSuported(Format f) Change-Id: I73ff7896c3d5c8bb491368e941b32c8026a47191 Reviewed-by: Paul Wicking <[email protected]>
* QPainter: Fix missing variable in drawPixmap snippetAndre Hartmann2023-05-291-2/+2
| | | | | | | Fixes: QTCREATORBUG-29216 Pick-to: 6.5 Change-Id: If055e7b4d6ba7734bc29da29db68b3224fc734c1 Reviewed-by: Paul Wicking <[email protected]>
* rhi: Make it a QPA-style private but semi-public APILaszlo Agocs2023-05-216-11/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qrhi.h, qshader.h, qshaderdescription.h (and qshaderbaker.h from shadertools; done separately) become "RHI APIs", following the concept of QPA APIs. Mirror completely what is done for QPA headers, but using the "rhi" prefix for the headers. This involves updating syncqt to handle the new category of headers. (a note on the regex: matching everything starting with "qrhi" is not acceptable due to incorrectly matching existing and future headers, hence specifying the four header names explicitly) There is going to be one difference to QPA: the documentation for everything RHI is going to be public and part of the regular docs, not hidden with \internal. In addition to the header renaming and adding the comments and documentation notes and warnings, there is one significant change here: there is no longer a need to do API-specific includes, such as qrhid3d11[_p].h, qrhivulkan[_p].h, etc. These are simply merged into a single header that is then included from qrhi.h. This means that users within Qt, and any future applications can just do #include <rhi/qrhi.h> (or rhi/qshader.h if the QRhi stuff is not relevant), no other headers are needed. There are no changes to functionality in this patch. Only the documentation is expanded, quite a lot, to eliminate all qdoc warnings and make the generated API docs complete. An example, with a quite extensive doc page is added as well. Task-number: QTBUG-113331 Change-Id: I91c749826348f14320cb335b1c83e9d1ea2b1d8b Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* Clarify module changes in Qt6Jaishree Vyas2023-05-091-1/+1
| | | | | | | | | Changed Briefs for better understanding Fixes: QTBUG-109324 Pick-to: 6.5 Change-Id: I15b0c0dc12b1bf96626fb8ea4ad16d04b2b118ca Reviewed-by: Kai Köhne <[email protected]>
* Remove unused documentation code snippetsFriedemann Kleint2023-04-175-120/+0
| | | | | | | | | | | | | | | | | | | Modules: - Core - Gui - Widgets - Open(Widgets) - PrintSupport - Sql - Network - Concurrent - Testlib Pick-to: 6.5 Change-Id: I63e58c01bec4bd162486020f0085227fdaa83b18 Reviewed-by: Ahmad Samir <[email protected]> Reviewed-by: Christian Ehrlicher <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* Docs: don't link to removed exampleVolker Hilsheimer2023-04-111-1/+1
| | | | | | | Pick-to: 6.5 Change-Id: I5fcec02cd18971150eec4f119d902c695bf2ebb9 Reviewed-by: Laszlo Agocs <[email protected]> Reviewed-by: Safiyyah Moosa <[email protected]>
* Fix warnings from deprecating QFileOpenEvent::openFile, update snippetVolker Hilsheimer2023-03-091-2/+10
| | | | | | | | | | | | Amends 76c63936d3d3c937960108da88a56394a0ac70b5 by adjusting the test case. We still just test that we can open a file based on a filename that we came up with ourselves. Also, update usage documentation and make the snippet a bit more relevant. Change-Id: I5bf00210d74e2a73d5a71a09a5beb1b3f6f8e225 Reviewed-by: Axel Spoerl <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>
* Android: use FileProvider with QDesktopServices::openUrl()Assam Boudjelthia2023-02-241-0/+10
| | | | | | | | | | | | | | | | | Allow openUrl() to use FileProvider for opening files that are located under app scoped paths and that use a file scheme for Android sdk 24 or above. [ChangeLog][Core][Android] Add FileProvider support for QDesktopServices::openUrl(). [ChangeLog][Core][Android] Add AndroidX dependency to Gradle builds by default since it's required by FileProvider. Fixes: QTBUG-85238 Change-Id: Ia7403f74f2a8fd4886f74dba72e42b318ef5d079 Reviewed-by: Konstantin Ritt <[email protected]> Reviewed-by: Nicholas Bennett <[email protected]> Reviewed-by: Ville Voutilainen <[email protected]>
* Turn elidedlabel example into a code snippetVolker Hilsheimer2023-02-091-1/+39
| | | | | | | | | | | | 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 <[email protected]>
* Remove "Analog Clock Window Example"Jan Arve Sæther2023-02-072-15/+22
| | | | | | | | | | | | This is almost exactly the same as the "Analog Clock" (widget) example. "Analog Clock Window Example" demonstrates: * How to render to a QWindow (covered by RasterWindow example) * QPainter and transformations (covered by Analog Clock example) * How to use QTimer (covered by Analog Clock example) Pick-to: 6.5 Change-Id: I7f20a29798830ed6345eca250e4139cb314cab84 Reviewed-by: Paul Olav Tvete <[email protected]>
* QUtiMimeConverter: document as public and fix \sinceVolker Hilsheimer2023-01-301-2/+1
| | | | | | | | | | | It's a new public API, so don't document it as internal. Fix the \since to 6.5 - it's an old class under a new name, and make a small language improvement in related documentation. Pick-to: 6.5 Change-Id: I57bfa868f19aa293c01d6a1f8bbbff1bebe7541a Reviewed-by: Marc Mutz <[email protected]> Reviewed-by: Kai Köhne <[email protected]>
* Documentation: Port code snippets to new connection syntaxFriedemann Kleint2023-01-113-14/+14
| | | | | | | Pick-to: 6.5 6.4 6.2 Task-number: PYSIDE-2182 Change-Id: I5f800cf3a4a7afefbc36a79372fc35449fa953f0 Reviewed-by: Mårten Nordheim <[email protected]>
* Doc: Fix linking to 'Drag and Drop' topicTopi Reinio2023-01-091-0/+1
| | | | | | | | | | | | | | Linking to 'Drag and Drop' target will link to a page local to Qt Widgets with that section title. The intention is to link to the topic page located in Qt GUI module. Add a descriptive keyword to the correct target page and use that for linking. Pick-to: 6.5 6.4 6.2 Fixes: QTBUG-109289 Change-Id: Ib6a39b43f9080cf5bb72fb07ab163e75eefb4da9 Reviewed-by: Venugopal Shivashankar <[email protected]>
* Reintroduce converter APIs for supporting native clipboard formatsVolker Hilsheimer2022-11-162-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 5, QWin(dows)Mime and QMacMime lived in the respective Extras modules, which were removed and partially folded into the relevant modules in Qt. QWindowsMime and QMacMime continued to provide the abstraction for implementing built-in support for native clipboard formats and UTIs within Qt, but only as private APIs. After the recent clean up of those APIs and respective infrastructure, we can now bring them back as public converter interfaces. Application developers can subclass those and instantiate an instance of their implementation to add support for platform or application specific data formats. These interfaces are not in the QNativeInterface namespace, as applications don't call into Windows or macOS using those interfaces. I.e. there is no class on which an application would call auto *converter= nativeInterface<QWindowsMimeConverter>(); Also, since applications override those converter types, we do want to guarantee binary and source compatibility. [ChangeLog][QtGui][QWindowsMimeConverter] Reintroduced to allow applications to add support for conversion from and to Windows-native clipboard formats to MIME-encoded data. [ChangeLog][QtGui][QUtiMimeConverter] Reintroduced to allow applications to add support for conversion from and to clipboard data on macOS and iOS to MIME-encoded data. Fixes: QTBUG-93632 Change-Id: Iebd909c3970015d203f59d5ab15e306b3d312f6e Reviewed-by: Yuhang Zhao <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>
* Rename QMacInternalPasteboardMime to QMacMimeVolker Hilsheimer2022-11-071-1/+1
| | | | | | | | | | | | | | | We want to make it public, and there is no need for "pasteboard" since it also coveres drag'n'drop. Add a default constructor that defaults to supporting both clipboard and drag'n'drop, and clean up the code by using that constructor where applicable. Historical note: the converter interface was called QMacMime up to Qt 4.2, when due to macOS changes it had to be replaced by QMacPasteboardMime. Task-number: QTBUG-93632 Change-Id: Id9712300039375aa6394598b104827e6f5d6c948 Reviewed-by: Timur Pocheptsov <[email protected]>
* Adapt qdoc macros and documentation for DocBookThibaut Cuvelier2022-11-043-0/+170
| | | | | Change-Id: I91e380e7670964937d90e478029f367177bf339b Reviewed-by: Topi Reiniö <[email protected]>
* Replace usages of Q_CLANG_QDOC with Q_QDOCLuca Di Sera2022-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | To allow the user to customize the C++ code that QDoc sees, so as to be able to work-around some limitations on QDoc itself, QDoc defines two symbols: Q_QDOC and Q_CLANG_QDOC, both of which are "true" during an entire execution of QDoc. At a certain point in time, QDoc allowed the user the choice between a custom C++ parser and a Clang based one. The Q_QDOC symbol would always be defined while the Q_CLANG_QDOC symbol would be defined only when the Clang based parser was chosen. In more recent times, QDoc always uses a Clang based parser, such that both Q_CLANG_QDOC and Q_QDOC are always defined, making them equivalent. To avoid using different symbols, and the possible confusion and fragmentation that derives from it, all usages of Q_CLANG_QDOC are now replaced by the equivalent usages of Q_QDOC. Change-Id: I5810abb9ad1016a4c5bbea99acd03381b8514b3f Reviewed-by: Kai Koehne <[email protected]>