aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* SplitView: document how to change handle touch area sizeMitch Curtis2021-07-192-0/+68
| | | | | | | | | | | Task-number: QTBUG-82678 Change-Id: Icf0f43454086a059e8e14a03db985e570233e0a9 Reviewed-by: Igor Bugaev <freedbrt@gmail.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 43c34d3a92839b8592cd2e1dfc63d1e2fbbcc3ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickFontDialog: Minor visual adjustments for universal and materialOliver Eftevaag2021-07-192-1/+4
| | | | | | | | | | | | | | | These changes are subjective, and might not be seen as an improvement by everyone. Personally, I felt that some space could be removed between the text fields and list views for the material style, and between the list views and group boxes for the universal style. Task-number: QTBUG-87799 Change-Id: I2a94caaa2304ccef0c9709bbfe9a0cd9b56e2034 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit ef9e58808c42ad52b3481de342309d8c4e9e8ee9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove unnecessary type registrtion function declarationsUlf Hermann2021-07-163-6/+0
| | | | | | | | | For auto-generated plugins we don't need the declarations. Change-Id: I0250703e7c81debc6bc6ca526722c43b8a8058c8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit fd2a2808ac2c53220c907d7177aee0d172102859) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Improve visuals of non-native FontDialogsMitch Curtis2021-07-145-8/+11
| | | | | | | | | | | | | | | | | | - Specify preferredHeights directly on the items that need them rather than doing it at a higher level. This makes the lower row with the text edits and check boxes shorter, giving more space to the row with the list views. - Convert the ColumnLayout containing the check boxes into a RowLayout to save vertical space. - Add some spacing and padding where necessary now that everything is more compressed. Task-number: QTBUG-87799 Change-Id: Iba288f678c1d449ace3bc143073d216fe69d9d9a Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit e2f4afcedb857f22e80671b638a80245a09cb249) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: some ComboBox functions must be used after component completionMitch Curtis2021-07-124-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | The internal QQmlDelegate model may not be ready until after componentComplete() is called. For example, the following code will print -1 for the find call, even though printing the model will show the "Hello" entry: ComboBox { id: comboBug anchors.centerIn: parent model: ["123", "BlaBla", "Hello", "Turtle"] currentIndex: { console.log("Model: " + comboBug.model) console.log("Find: " + comboBug.find("Hello")) return comboBug.find("Hello") } } Fixes: QTBUG-94257 Change-Id: I6e8c2a4eb8ca7ffca0a38d2f2e914cf791d3bd2e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 332011c8e6a96cd2b0c685b72f96337660f690e0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: make it clear that Page doesn't render its title textMitch Curtis2021-07-121-0/+3
| | | | | | | | | This is demonstrated in the example, but it's better to make it clear. Change-Id: Ie5efcca2256da6a03d31df9cf045f4a97d1ad1ed Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 41766ac6d6e100b69d74c98edde60f0835b7da13) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Adjust to QQuickItemPrivate::{width,height}Valid becoming a functionFabian Kosmale2021-07-1211-55/+55
| | | | | | | | | Task-number: QTBUG-94703 Change-Id: I2c48f1cc94b8dd94cddab1d833f62299d35fe5d9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 2a4ff847e8c018f31b14ecffd229d3793138ab1b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickOverlay: Handle hover eventsFabian Kosmale2021-07-124-0/+39
| | | | | | | | | | | | | | | | | | With recent changes to hover handling logic, hover events would have been sent to the "main window", even if a popup were modal. As this is unwanted (a modally blocked button should not auto-raise when hovered), we now prevent delivery of those events in QQuickOverlay and overlayEvent. The logic is the same as for mouse and touch events: If we get a matching event, we ask the popup to handle it. The popup then uses the existing blockInput logic to decide whether the event should be blocked or forwarded. Change-Id: I2194fd8e832592efd5b7b9697412bdaeaea74b83 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 48da34f3d797f58b3eda9ed0a98aa1776d75d946) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Don't give plugins PUBLIC usage requirementsJoerg Bornemann2021-07-0919-97/+2
| | | | | | | | | | | | | | | | | | | | | | | | The pro2cmake.py conversion script faithfully reproduced the .pro files for the plugins, which specified the libraries as public. But in CMake, the implications of this are that public usage requirements should then be propagated to consumers. We don't expect any consumers, since a plugin is created as a MODULE library in CMake, so for Windows we don't even have an import library to link with. The only exception to this is for static builds where plugins are created as STATIC libraries instead, but only in certain controlled situations do we then link to plugins. Even then, usage requirements are not expected to propagate to the consumers, so these relationships should always be specified as private. As a drive-by fix, remove Qt::Foo dependencies that are already implied by Qt::FooPrivate. Task-number: QTBUG-90819 Change-Id: I3f33766612367520e09e599f03ac06d43613aa81 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 9c30798a439e6a87b574472aca7a4e15107c6221) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't leak buttons in QQuickDialogButtonBoxUlf Hermann2021-07-051-0/+1
| | | | | | | | Fixes: QTBUG-94455 Change-Id: I8d8c82f3b10e5e755ac11924c335ee07ab08d4a6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry-picked from commit af4137ec20f0cd0e4f385cc5e7a7f2d0a87df6f7) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix compilation for msvc2019Igor Bugaev2021-06-294-5/+5
| | | | | | | | | | | | The Visual Studio 2019 (16.8), marks construction function(var */*name*/) as warning, but compiler flag /WX marks warnings as errors, and because of this, it's not possible to compile this module. This issue fixed in Visual Studio 16.9 Change-Id: If79d1b73d916472e2e82d15ebf423eac646fc76d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 184a5cc25f7c4a30c82a61848a0e62d9044041f5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Native style: Do not assertJan Arve Sæther2021-06-281-2/+4
| | | | | | | | | | | | When a component (e.g. Button) is used as a delegate in ListView, we might get a updatePolish() before the component is completed. Make sure we don't call polish() before we are completed. Fixes: QTBUG-93041 Change-Id: Iba5d1a4365c864f8ff8115383880500feac7bc5d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 0c2adb5652480f7546fadb78b652a09294c4e646) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows: fix error in CheckBox.qml when hoveringMitch Curtis2021-06-221-1/+3
| | | | | | | Change-Id: I897327d5f3bfd0ebbdca2df74ea43d6625c67a65 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit d8a1aac5651f346aa1df1cd912e33c1a82d41e42) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows: fix error in Button.qml when hoveringMitch Curtis2021-06-221-1/+3
| | | | | | | | Fixes: QTBUG-92824 Change-Id: I261b269187b0106939837620287838222f8923b4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit e548d825aef388178147f27539b17cc8dc0d5e9a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove old configure-related filesJoerg Bornemann2021-06-172-104/+0
| | | | | | | | | | | | | | Remove the configure.json and configure.pri files that were used for the qmake-based configure. Remove the .prev_*.cmake files that were a by-product of configurejson2cmake.py. Task-number: QTBUG-89536 Change-Id: Ie6c3d946a7157164c3854ef22812262aa7237c4f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 1a65241804842e9456834d29b74f96e1d7b24cc1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickComboBox: fix acceptableInput being wrong if no validator was setOliver Eftevaag2021-06-171-3/+27
| | | | | | | | | | | | | | | | | | | This patch fixes an issue with hasAcceptableInput(), if the property would be read before the contentItem had been set by the qml engine. This would cause hasAcceptableInput to return false by default, even though the default value is supposed to be true, if no validators or inputMasks are being used. The solution that I've chosen, is to give the QQuickComboBox its own acceptableInput variable, and connect the contentItem's acceptableInputChanged() signal to a function that polls for the contentItem property, and updates its variable accordingly. Fixes: QTBUG-94307 Change-Id: I587d76162e75544a7ed1df9e3b9104bd73013bb0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit f8db2b996f339ad7e0754cd232f1e71ebecf6367) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use the added placeHolderText color available in PaletteAndy Shaw2021-06-179-8/+10
| | | | | | | | | | | This allows it to pick up the Palette's placeHolderText color by default while still using the property if it is overridden with that. Task-number: QTBUG-93746 Change-Id: Ie6af95d6c60fa80f2789c2acd5964b5a347194ce Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit a7f627b08d4c3e0dc963018c67c5f8aff3f77b4a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Set inactive color for ButtonText in Fusion themeVolker Hilsheimer2021-06-171-0/+2
| | | | | | | Pick-to: dev Fixes: QTBUG-94559 Change-Id: I66c84052801aab56ad759289053e20d32e13c765 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Add recursion guard to QQuickApplicationWindowPrivate::relayout()Jan Arve Sæther2021-06-161-1/+4
| | | | | | | | | | | | | | relayout() might change the size of the header, footer or contentitem When one of those items changes, QQuickApplicationWindowPrivate will get notified by that through QQuickApplicationWindowPrivate::itemGeometryChanged(). itemGeometryChanged() will then call relayout()... (*recursed*). Task-number: QTBUG-87708 Change-Id: I9403952e776afb2be37d009642c65b5520c79341 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 6dc95399797de4ec27984956df1fa587f4eb18ba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickPopup: finalizeExitTransition before deleting internalsUlf Hermann2021-06-151-4/+5
| | | | | | | | | Otherwise they get re-created and leak. Change-Id: Ib6af70bed196d3b32faa1df7f40063a38e321987 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 5f3eec895639aeadc187a641a293895f52b51147) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update copyright header to refer to Qt Quick DialogsOliver Eftevaag2021-06-0952-52/+52
| | | | | | | | | | The source files in Qt Quick Dialogs should now have a copyright header that mentions they are indeed a part of the Qt Quick Dialogs module. Change-Id: I855edbca61f8e5c2a08dea50b5c70f1cdb3f996f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 74ab735615b74d3f91748f069d9f24b5ab73adbf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add new control: SelectionRectangleRichard Moe Gustavsen2021-06-0610-0/+958
| | | | | | | | | | | | | | | | | | This patch will add a SelectionRectangle to controls. A SelectionRectangle can be used together with TableView to let the user select cells using either pointer Drag or PressAndHold. It lets the developer set their own handle delegates, or simply use the included ones added to the Basic style. [ChangeLog][Controls][SelectionRectangle] A SelectionRectangle has been added to Controls. A SelectionRectangle can be used to make selections in TableView. Fixes: QTBUG-74750 Change-Id: Ia7af578c1c905b0e92df193d7820ad6ef2c9b697 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update to latest qml CMake APICraig Scott2021-06-052421-1681/+725
| | | | | | | | | | | | | | The new qml CMake API places a closer relationship between the backing target and the plugin target. Both are typically created together and they share a lot of common details. Instead of creating them in different parts of the source tree, they are now specified together. The src/imports area has effectively been absorbed into the other corresponding subdirectories below src with this change. Task-number: QTBUG-91621 Change-Id: I9bd32e9eb78c198ccc9db04e2829303cac323502 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add FontDialog to QtQuick.DialogsOliver Eftevaag2021-06-0417-1/+2780
| | | | | | | | | | | Adding non-native FontDialog to QtQuick. This is a native FontDialog on platforms that support it, and a non-native Qt Quick FontDialog on platforms that don't. Fixes: QTBUG-87799 Change-Id: I43a59e3668a8a40f1d0c04a3c2506283d552a22b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix FINAL warningMitch Curtis2021-06-035-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | An example of the warning: "Final member contentWidth is overridden in class QQuickPage. The override won't be used." - Remove FINAL from base class properties that are overridden by subclasses where it's not clear if it would be safe to not override those properties - Everywhere else, stop redeclaring properties in subclasses. This will result in e.g. MenuBar not having a contentWidth property if the QML is importing version 2.4, but as we're now long past that version, it should be fine. This fixes some auto tests that were failing after ba2928c787cf0988a7f6a7d424faea96ff707846. [ChangeLog][Important Behavior Changes] QML code that imported version 2.4 or earlier will no longer be able to access contentWidth and contentHeight in types derived from Container (i.e. MenuBar, etc.). Fixes: QTBUG-94180 Change-Id: I3cdb79de8a1b54ab0c78ad661c432c47d5d1dfc6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Adjust to bindable QQuickItem propertiesFabian Kosmale2021-06-032-3/+3
| | | | | | | | | | This prepares for QQuickItem's properties becoming bindable, changing the type of QQuickItemPrivate::{x, y, width, height}. It adds explicit casts/types where implicit conversion or type deduction would fail after the conversion. Change-Id: I9e25b45d1c7de162c3e72e8ec337b198bfd29c57 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add a foreign registration for QQuickColorGroupUlf Hermann2021-06-011-0/+8
| | | | | | | | | | It has aqcuired revisioned properties. Task-number: QTBUG-33179 Change-Id: I31ce4b07649ccc20789ed15bfb50e1643f6e4bff Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove no longer used dependencies.json filesCraig Scott2021-05-316-57/+0
| | | | | Change-Id: I82a18e7a0e768fe57c9cb08666b5486ecfa00ba8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix typo in exported declaration of qml_register_types... functionCraig Scott2021-05-311-1/+1
| | | | | | | | | | | This prevented the function from being exported if something actually tried to use it. At the moment, no other file is including the affected header (that is a separate bug in qmltyperegistrar), which is why the build wasn't failing despite the typo. Change-Id: Ia9b266c4f5a42326932344e49bea228fd36ebb65 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix MSVC warning C4267Kai Köhne2021-05-281-1/+1
| | | | | | | | | | | | | | | | | C4267: 'argument': conversion from 'size_t' to 'const Key', possible loss of data in deferredStates()->insert(qHash(object, property), state); and QQmlComponentPrivate::DeferredState *state = deferredStates()->take(qHash(object, property)); The return type of qHash got changed to size_t in commit bd5b9cae7a29 Change-Id: If11de4fcd29a4d6ac8104e55ce18dd82f372054e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix MSVC warning C4065Kai Köhne2021-05-281-5/+8
| | | | | | | | | | MSVC doesn't like it when there's only a default switch: qquickwindowsstyle.cpp(2284): warning C4065: switch statement contains 'default' but no 'case' labels Pick-to: 6.1 Change-Id: I3d6072e88a3aeec3a6801c2b0ddffd8e9f511943 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add QtQuick.DialogsMitch Curtis2021-05-27128-30/+8221
| | | | | | | | | | [ChangeLog][QtQuickDialogs] Added FileDialog. This is a native FileDialog on platforms that support it, and a non-native Qt Quick FileDialog on platforms that don't. Fixes: QTBUG-87797 Change-Id: Ia3a98b616479b818c96c232a0329750023079642 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Sync the visibility of the FocusFrame with the target itemAndy Shaw2021-05-271-1/+1
| | | | | | | Fixes: QTBUG-93994 Pick-to: 6.1 Change-Id: Ib9138f6bc59bcf7b97d5ccb478c7b9c434dfef64 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Revert "AbstractButton: set automatically as checkable when being checked"Alexander Akulich2021-05-261-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8ba12ed7f25d8cfb7619b6eb0a26fe4ae3e823b1. The referenced commit was introduced to simplify buttons setup: Button { checked: true } Button { checkable: true } With the commit the first button becomes 'checkable' automatically. However, the implemented behavior violates the principle of least surprise, listed in "API Design Principles". The following checkbox will be checkable despite of the explicitly set properties: CheckBox { checked: true checkable: false } This is a "surprising" behavior which makes some rare and already complex use-cases unnecessarily complicated. The save of explicit "checkable: true" does not justify the surprice and the ugliness of the code needed to overcome the forced checkable property if needed. [ChangeLog][Important Behavior Changes] Setting the AbstractButton's 'checked' property to 'true' does not automatically set its 'checkable' to true anymore. Fixes: QTBUG-93807 Change-Id: Ia35138ee6a09bb9f361f52a84e53578b0b6e57e3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix layout is always RTL when locale is RTLHyunkook Khang2021-05-262-12/+9
| | | | | | | | | | | | | | | | isMirrored() will always return true when locale is RTL, so that we cannot change the layout. To fix this, remove out the relation between LayoutMirroring.enabled and locale's text direction. [ChangeLog][Controls][Important Behavior Changes] Control's locale property no longer affects layout direction. Use LayoutMirroring instead. Fixes: QTBUG-91227 Change-Id: Ibedd3f09828f81f1889077892452a27c90e21533 Reviewed-by: Hyunkook Khang <hyunkook.khang@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* TextArea: Detach the flickable when it is deletedAndy Shaw2021-05-261-0/+4
| | | | | | | | | | | When the flickable is deleted before the TextArea is (which can happen when it is a child of a ScrollView) then we need to make sure that the TextArea no longer keeps a reference to the Flickable object. Fixes: QTBUG-93958 Pick-to: 6.1 5.15 Change-Id: I1745065370718e60bc459192e15eae0e1ba36231 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Don't call QQml_setParent_noEvent with a nullptr itemVolker Hilsheimer2021-05-191-2/+2
| | | | | | | | | | | | Since we check for item being nullptr just before it evidently can be, in which case QQml_setParent_noEvent would access that nullptr. Fixes issue raised by code checker in 23fe43ee0a0838e3b680f6dc55cd226e Pick-to: 6.1 5.15 Change-Id: Ic5306c0c8d89734a606ab90addc6540621696553 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Don't access QStyleOption* without checking for nullptr firstVolker Hilsheimer2021-05-191-2/+2
| | | | | | | | | | | It can be nullptr as per the preamble to the function, and the fact that the parameter defaults to nullptr. Addresses code checker report 723994a37c58a4dcc3aeb573e1d517c5. Pick-to: 6.1 Change-Id: Id17c95314f4adfa48e7754120ecc36a2efac5403 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Hide old scroll barsMitch Curtis2021-05-191-0/+16
| | | | | | | | | | Reuse the hideOldItem added in 80f1186338bcf8c7d692b4fadfc46531c002c6b0 to unparent and hide them. Fixes: QTBUG-89126 Pick-to: 6.1 5.15 Change-Id: I641e46571b8ac42e0e5080b6737f305ff59afd51 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: apps that never set a style in Qt 5 should set Basic in Qt 6Mitch Curtis2021-05-121-0/+5
| | | | | | | | | | This avoids surprises when moving to Qt 6, where the default style is now platform-dependent. Fixes: QTBUG-92158 Pick-to: 6.1 Change-Id: I44cede00379b507f97ae7ac51aa5717c1b6510a8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Allow creation of custom QQuickPopupItem-derived typesMitch Curtis2021-05-118-82/+175
| | | | | | | | | | | This allows QQuickPopup-derived types to have their own QQuickPopup-derived popup item. This is useful for controlling e.g. implicit content item sizing. Task-number: QTBUG-83630 Pick-to: 6.1 5.15 Change-Id: I279d2e39df9a9cff29b3015a2f5baae7128f461f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* ToolTip: use contentWidth of Text contentItem to account for newlinesMitch Curtis2021-05-115-4/+212
| | | | | | | | | | | | | | | | By default, QQuickPopupItem uses the implicitWidth of its contentItem, which is too large in the case of a ToolTip with newlines in the text. In that case, contentWidth refers to the width of the text including newlines, so we use that instead. [ChangeLog][Controls][ToolTip] The implicit width of ToolTips now accounts for newlines in the text. If you want to use the old behavior, set ToolTip's contentWidth to implicitContentWidth. Fixes: QTBUG-83630 Pick-to: 6.1 5.15 Change-Id: I7ca3805429acb68a13ead8f3545bb84a51fb1b72 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove Qt Quick Calendar from overviewKai Köhne2021-05-111-4/+0
| | | | | | | | The module is only available on marketplace Pick-to: 6.1 Change-Id: I0910630b746b6eb4935fabdbc5148677c08bb234 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Slider: Fix broken NoSnap and SnapOnRelease modeJonas Karlsson2021-05-071-1/+1
| | | | | | | | | | A NoSnap and SnapOnRelease mode should always update the sliders position even if the value is not updated. Fixes: QTBUG-76136 Change-Id: I6cf6f948bfe582acc7f105373fb1938353acf2e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Imagine: fix GroupBox's bottom edge being clippedMitch Curtis2021-05-061-2/+1
| | | | | | | | | | Use the actual padding from the nine patch image rather than the hard-coded 12. Fixes: QTBUG-91924 Pick-to: 6.1 5.15 Change-Id: I4707ae173c088625657a135680619cf646e3a9e2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* macOS, Slider: draw a focus rect, and not a focus ringRichard Moe Gustavsen2021-05-051-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | In the mac style, we draw the focus ring for a slider from QML around the handle. This has shown to be fragile, since UIKit doesn't draw the handle in the center of the rect we get when we query UIKit (using the [cell knobRectFlipped:slider.isFlipped]). And then the focus ring will be offset as well. While we could try to adjust the rect manually from QQuickMacStyle, this will only be quaranteed to work on top of the current macOS SDK (macosx11.1). So for that reason, this patch falls back to use the less correct, but more future safe, solution of drawng the focus ring as a rect around the handle instead. While this doesn't look native, it still looks better (and correct, for the uninformed) compared to an eliptic ring that is misplaced on the target. Fixes: QTBUG-93423 Pick-to: 6.1 6.0 Change-Id: Ibc00f12f9606cd66c8ff384967aa3ea0d7727964 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Doc: fix table of ComboBox's implicitContentWidthPolicy enum valuesMitch Curtis2021-05-051-3/+0
| | | | | | | | Can't have newlines in there otherwise it breaks up the table. Pick-to: 6.1 Change-Id: Ia64d94fc6d08dd6000b3663af030c8e5a7a7e3ef Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: clarify sizing behavior of PageMitch Curtis2021-05-051-1/+14
| | | | | | | | Items declared as children must be positioned and sized manually. Pick-to: 6.1 Change-Id: Ie2b2989de07729464ae38b634992d53063ff739d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Native style: fix up some commentsRichard Moe Gustavsen2021-05-051-3/+3
| | | | | Change-Id: Id3d3db4b49dcbbc662a24eabb65ac6908577a4af Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* macOS: don't set Qt::StrongFocus on Sliders by defaultRichard Moe Gustavsen2021-05-041-0/+4
| | | | | | | | | | | | On macOS, the sliders should not get focus from clicking (Qt::StrongFocus). Instead, it should follow the logic we already do for buttons (which includes checkboxes and radiobuttons), which uses Qt::TabFocus by default. Fixes: QTBUG-93430 Pick-to: 6.1 6.0 Change-Id: I6d0d3d876a0b8c0e9cd9b23f12856090aa6a8173 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>