aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls
Commit message (Collapse)AuthorAgeFilesLines
* StackView: fix an issue where the current item was hiddenMitch Curtis2019-12-121-0/+59
| | | | | | | | | | | | | | | | When a StackView has an item A as the current item, calling replace(B) and then replace(A) would result in A being hidden when all transitions were finished. When an item is finishing its transition, we can check to see if that item exists in the stack (i.e. was pushed while it was transitioning), and if so, don't hide it. The patch is based on the one from Anthony Groyer. Fixes: QTBUG-57267 Change-Id: I441559c54a35c577261074bc7f0c923aeb3ca330 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* ComboBox: change currentIndex (if applicable) when focus is lostMitch Curtis2019-12-101-0/+52
| | | | | | | | | | | | When the user enters text into an editable ComboBox that matches the text of an entry in the model, and then tabs out to another item, the currentIndex should be changed to that entry. This brings the behavior of ComboBox in line with QComboBox. Change-Id: Ibb1e201a503704681ebcbc7135d1964cc1f6bbca Fixes: QTBUG-78885 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* StackView: fix crash when recursively removing itemsMitch Curtis2019-12-051-0/+100
| | | | | | | | | | | | | | | | | This can happen when e.g. calling clear() in Component.onDestruction in response to a pop() call. The patch fixes the crash by warning and returning early. If users really need to do this, the clear() call can be delayed: Component.onDestruction: { Qt.callLater(function() { stackView.clear(StackView.Immediate) }) } Change-Id: If3cf07495bb34b96089522f44c36976bd6c62492 Fixes: QTBUG-80353 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* SplitView: fix hoverable child items breaking handle hover stateMitch Curtis2019-12-041-0/+51
| | | | | | | | | Detect HoverEnter events by filtering the mouse events of child items, and respond by clearing any hovered handle. Change-Id: Ice7e7fe3cc4c9224064c2384cd832e4a7d91c4da Fixes: QTBUG-79846 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* tst_dial: fix test_dragging afer mouseDrag() changesMitch Curtis2019-11-231-8/+14
| | | | | | | | | 02ffe50af41526f604ae61d41bf2150037d67473 fixed some incorrect behavior in mouseDrag() that these tests were unknowingly relying on. Fixes: QTBUG-80153 Change-Id: I486061cc7d7fe44ef7b9ff8924c711572a01e44a Reviewed-by: Liang Qi <liang.qi@qt.io>
* Make ToolTips wrapMitch Curtis2019-11-151-0/+22
| | | | | | | | Otherwise the text will go outside the window. Change-Id: I3d50a195b1ee6c9b5d49952ef6c49d17c61372fa Fixes: QTBUG-62350 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* SwipeView: fix issue where child items couldn't get focusMitch Curtis2019-11-151-0/+49
| | | | | | | | | Set the focus property of the contentItem (ListView) to the focus property of the SwipeView itself. Change-Id: Ic410f7fb8db9fbb758b956dfe07e1b4265f5f687 Fixes: QTBUG-62401 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-041-0/+69
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ibf7cf09570e73ad2f314e9ce7acf1c766ac3f332
| * SplitView: fix issue where Repeater items were not createdMitch Curtis2019-10-291-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SplitView's contentItem is lazily created whenever contentItem() is called. When adding regular, standalone items, they will go through QQuickContainer::addItem(), which eventually calls contentItem(). This case works fine. Repeaters, on the other hand, call setTransparentForPositioner(true), which QQuickContainerPrivate::contentData_append() checks for, and instead of calling addItem(), reparents the Repeater to effectiveContentItem() with this line: item->setParentItem(effectiveContentItem(p->contentItem)); If this happens before the contentItem is created, then the Repeater has no parentItem and won't generate any items. So, instead of using the contentItem member directly, call contentItem() to create it if it doesn't exist. Fixes: QTBUG-79302 Change-Id: I258f7420d2fea843ed045d569f80e92fe1f507d2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-261-17/+16
|\| | | | | | | Change-Id: I5da24592eb292ef4f430d734fec234166ce6e1e3
| * tst_splitview.qml: remove unused SplitViewsMitch Curtis2019-10-241-17/+0
| | | | | | | | | | | | | | These make debugging SplitView issues very confusing. Change-Id: Iea09bd5339044ac330188233286acc695e335283 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * Fix assertion failure when hiding a SplitView with only one itemMitch Curtis2019-10-231-0/+16
| | | | | | | | | | | | | | | | Check for -1 when calling handleIndexForSplitIndex(). Change-Id: I81021b64265ace0c47269ea54e538a2725c84b79 Fixes: QTBUG-79270 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-012-3/+33
|\| | | | | | | Change-Id: I53fc18c168daff6dfb504e5a64e20570de7d24ac
| * QQuickToolTip: fix setTimeout() behavior when tool tip is visibleKonstantin Ritt2019-09-271-0/+9
| | | | | | | | | | | | | | by applying the passed timeout value prior to re-starting the timer Change-Id: I27953dbb4781b5cb0c2039d56faa56f3c000206f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Tumbler: fix displacement calculation when wrap is falseMitch Curtis2019-09-241-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | Use the position of the item and the currentItem in the calculation in order to get reliable results. This fixes the displacement being off by a small margin, which increased as the delegate height became smaller. Fixes: QTBUG-66799 Change-Id: Ieca5033fb4c0ed62f5965a21fcab7aa558bd40e6 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-241-0/+68
|\| | | | | | | Change-Id: I34f3fa5e3cd2ebb0ed8f7d4e6d5ed6f66422a48d
| * TextArea: prevent changing size of background recursivelyKonstantin Ritt2019-09-191-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the x/y position of background depends on the height/width of background and these values are not constant, the if statement in the method resizeBackground() will always pass. And since `resizingBackground` guard wasn't checked, any geometry change will always call resizeBackground() and then call themself recursively (via the change listener), that means the height/width of background will always be reset, no matter what value you set. Another part of the issue was in determining the extra bits too late: in case the background gets parented by the flickable, the new child caused the flickable to re-calculate its metrics and thus resize the background *prior* to remembering if it has w/h set. As a side effect, this fix also brings the possibility to reset previously set w/h to get the default background sizing behavior. Inspired by da06da57002b64cf4bcde0ca708b3275a5f919ae [ChangeLog][QtQuick][QQuickTextArea] prevent changing size of background recursively in construction Fixes: QTBUG-76369 Change-Id: Ide51ec1ebab63605ae3bfcc10a76a28be960ef36 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-112-10/+16
|\| | | | | | | Change-Id: I60cfd7fbece6d34349767d13d376b7494eb525b2
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-081-1/+7
| |\ | | | | | | | | | Change-Id: Ifa88045268cdaa1adc0b1e206d5e20a3721d3837
| | * QQuickIcon: properly resolve implicit valuesKonstantin Ritt2019-09-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | when the property has not been set explicitly, the resolved mask must not contain a respective bit set either Change-Id: Iab0bd600b5bf458e26ed4601d4d2f608021f1518 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | tst_dial: fix copy-paste mistakeMitch Curtis2019-09-061-9/+9
| | | | | | | | | | | | | | | | | | | | | Slider was incorrectly used in a03b6fec6. Change-Id: Ib76172f9ea0dca3b776a74df2329bd63c72f8517 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-043-0/+110
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ib55ecb95e5ae47cc7a46f136a2f2eb158676ea34
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-07-043-0/+110
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/accessibility/tst_accessibility.cpp Change-Id: I0bc187e2a8edb4e357c1bf114dd9b1977d5c1e45
| | * Add a test for having a ShaderEffect as a delegateJan Arve Sæther2019-05-221-0/+58
| | | | | | | | | | | | | | | | | | Change-Id: If4f3dca99638015b479509e4aa73e0190b1182ac Task-number: QTBUG-67343 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Don't unnecessarily transform keysequences into stringsUlf Hermann2019-05-161-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we cannot interpret them as the original key sequence anymore. When passing them on they are interpreted as the number key that represents the numeric value of the key sequence enum. Change-Id: Idd94ef95bc693cb6d51162dd1994adc953b52e25 Fixes: QTBUG-75572 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Container: Keep currentIndex at 0 when removing item 0 if possibleJüri Valdmann2019-05-071-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current behavior is to always decrement the currentIndex when the current item is removed -- even when the current item is item 0. This means, for example, that in a TabBar with three tabs and the first tab selected closing the first tab will leave nothing at all selected. Change behavior to keep currentIndex at 0 if there are still items left in the container. Now closing the first tab will leave the next remaining tab selected. Change-Id: If4e1903366e29fcee8226b776d5b2e03cec189df Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | unblacklist passing testsDaniel Smith2019-06-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | These tests have not failed on the removed platforms for at least 60 days Task-number: QTBUG-76608 Change-Id: I0f49529cc567fcc8eaffbe06adb4b260cd1a9e06 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-151-5/+13
|\| | | | | | | | | | | Change-Id: Id8cb931daffd3dd0f75c283a9adb98ddc976973b
| * | SplitView: fix preferredHeight not being restored in restoreState()Mitch Curtis2019-06-101-5/+13
| | | | | | | | | | | | | | | Change-Id: Icc236494f5df382d6bc49092d23a460822c835a1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | tst_combobox.qml: remove temporary skipsMitch Curtis2019-04-231-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4e5ff56a18dc7bb13680a8fbe30ba5aae2dfa206 has now been included in a qt5.git submodule update (74eab55ea83a9919e0a3085015d2e522bd351ac1), so the tests are no longer failing and hence do not need to be skipped. See 6c787542df32c59fe0299b2ad884968de28dbcba for more information. Task-number: QTBUG-74919 Change-Id: Ia993e5c138cdf9369e6bff868bba3f49c6d20270 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Add valueRole API to ComboBoxMitch Curtis2019-04-231-1/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the user to conveniently manage data for a role associated with the text role. A common example of this is an enum stored in a backend with nicely formatted text displayed to the user. Before this patch, developers would have to write code like this: ComboBox { textRole: "text" onActivated: backend.modifier = model[currentIndex].value Component.onCompleted: currentIndex = findValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] function findValue(value) { for (var i = 0; i < model.length; ++i) { if (model[i].value === value) return i } return -1 } } With this patch, the code becomes much simpler: ComboBox { textRole: "text" valueRole: "value" onActivated: backend.modifier = currentValue Component.onCompleted: currentIndex = indexOfValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] } [ChangeLog][Controls][ComboBox] Added valueRole, currentValue and indexOfValue(). These allow convenient management of data for a role associated with the text role. Change-Id: I0ed19bd0ba9cf6b044a8113ff1a8782d43065449 Fixes: QTBUG-73491 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-162-0/+84
|\| | | | | | | | | | | Change-Id: Ica87b5aac6a7ca335acd9c5da998cc1831347420
| * | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta3Qt Forward Merge Bot2019-04-132-0/+84
| |\| | | | | | | | | | Change-Id: Ice7d2ed56c85521a946b218d84087b255d3613ae
| | * QQuickComboBox: don't hide popup if focusedAlberto Mardegan2019-04-101-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ComboBox popup should be closed when the ComboBox loses focus, but not if the control gaining focus is the popup itself. While all the styles implemented in this module implement the ComboBox popup as an unfocusable window and handle all the keyboard events in QQuickComboBox itself, the developer can choose to replace the popup with a custom implementation, which might need the keyboard focus. Fixes: QTBUG-74661 Change-Id: I838ab9cb697df63ea2099e68f1ae99eadb06be08 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * SpinBox: fix indicators being hovered when mouse is moved while pressedMitch Curtis2019-04-081-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We also need to update the hovered state of each indicator when the mouse is moved while pressed, not just when we get hover move events. Change-Id: I6fa71344fd540f648683958e5804ae735523e72d Fixes: QTBUG-74688 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-092-33/+24
|\| | | | | | | | | | | Change-Id: Icc0bf6680e7c329a797f9924c283023a3d42b93a
| * | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta2Qt Forward Merge Bot2019-04-062-33/+24
| |\| | | | | | | | | | Change-Id: I5b112e0e4021191c387da86bb5b0477fe0c4da30
| | * tst_dialogbuttonbox.qml: consolidate two similar testsMitch Curtis2019-03-291-24/+11
| | | | | | | | | | | | | | | | | | | | | into one data-driven one. Change-Id: I7507765747dd984530e50df5cd08152b9d71cb66 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * tst_dialogbuttonbox.qml: use tryVerify() consistently to avoid flakinessMitch Curtis2019-03-291-8/+12
| | | | | | | | | | | | | | | | | | Change-Id: Ic18cca692b09f55818b9c99379aae4be72ba4159 Fixes: QTBUG-74711 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * Attempt to stabilize Tumbler::test_itemsCorrectlyPositionedMitch Curtis2019-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not sure if this will help (because I haven't been able to reproduce the flakiness, even in a CI VM), but the tumbler should really not still be spinning after we got the position of its items, so make sure it's stopped before doing any comparisons. Task-number: QTBUG-70597 Change-Id: I72555747b2ea4ef136cdaa13f7b0757be2624e73 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Fix broken buildMitch Curtis2019-04-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove the override keyword from QQuickComboBoxDelegateModel::stringValue() as the function is no longer virtual, and a change in dev will fix this properly once a qt5.git submodule update happens. - Temporarily skip any failing ComboBox tests that result from the previous step. Task-number: QTBUG-74919 Change-Id: If57bfbd1c8b253cb9ad3bfad4b5f9b9a271744ab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-301-0/+29
|\| | | | | | | | | | | Change-Id: Iede101fc3931d918c1796eb32fd6352e3b2f3b68
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-271-0/+29
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I37f9f88a11946d5d67935c682273eb0aa8593f9b
| | * DialogButtonBox: don't sort buttons based on their memory addressesMitch Curtis2019-03-221-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When two buttons' roles are equal, the code would fall back to comparing the buttons' memory addresses. This leads to random results, which are especially noticeable on Windows and with release builds. This patch fixes the issue by instead returning false if the roles are equal. This still satisfies the "comp(a,a)==false" requirement of strict weak ordering: https://en.cppreference.com/w/cpp/named_req/Compare The patch also changes the sorting algorithm used from std::sort() to std::stable_sort(). Although it doesn't appear to be necessary from the testing that I did, it is good to ensure that the order of equal elements is maintained. Fixes: QTBUG-70451 Change-Id: I47561604108b12bf8ec0c794a2372767f0b2e04e Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-211-2/+134
|\| | | | | | | | | | | Change-Id: I48383fc70de754394259d5dfd19c7b25f1280f67
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-161-2/+134
| |\| | | | | | | | | | Change-Id: If27c142786ad2457a80ce1ef65220834eda81e94
| | * Fix DialogButtonBox content size calculationMitch Curtis2019-03-151-2/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some history: - f1f884d3 worked around an issue in DialogButtonBox. - c2fd8f7d fixed it by using contentWidth; i.e. the implicit width of the contentItem. It caused QTBUG-72372. - I tried to fix QTBUG-72372 with 6476de0b, but created (or exposed) QTBUG-73860. The problem in QTBUG-73860 can be seen with the following example: Dialog { id: dialog visible: true standardButtons: Dialog.Ok } The single 'Ok' button here will go outside of the dialog. The underlying issue can be seen by looking into DialogButtonBox.qml: implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, (control.count === 1 ? contentWidth * 2 : contentWidth) + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) The implicit width of the box in this case is contentWidth * 2 (there is one button, so control.count === 1). This should result in the button taking half the width of the box and being aligned to the right: alignment: count === 1 ? Qt.AlignRight : undefined ... delegate: Button { width: control.count === 1 ? control.availableWidth / 2 : undefined } What actually happens is that the contentItem (ListView) is temporarily 0 until it gets its final size of 100. However, QQuickDialogButtonBox doesn't respond to this change in the ListView's contentWidth. This problem can be fixed by returning to c2fd8f7d's resizeContent() implementation, which uses contentWidth. Then, there is a second issue: Dialog { id: dialog visible: true standardButtons: Dialog.Ok width: 300 } The button here is also positioned outside of the box. The problem is that the contentWidth is based on implicitContentWidth: QQuickContainerPrivate::updateContentWidth() { // ... contentWidth = implicitContentWidth; // ... } implicitContentWidth is calculated by calling getContentWidth(): void QQuickControlPrivate::updateImplicitContentWidth() { // ... implicitContentWidth = getContentWidth(); // ... } In the case of horizontal alignment, QQuickDialogButtonBoxPrivate::getContentWidth() uses the implicit width of the largest button: for (int i = 0; i < count; ++i) { QQuickItem *item = q->itemAt(i); if (item) { totalWidth += item->implicitWidth(); maxWidth = qMax(maxWidth, item->implicitWidth()); } } // ... if ((alignment & Qt::AlignHorizontal_Mask) == 0) totalWidth = qMax(totalWidth, count * maxWidth + totalSpacing); The Default style button has an implicitWidth of 100. The DialogButtonBox in the example above is 300 pixels wide, so the button should be 150, and it is, thanks to its width binding. However, the DialogButtonBox uses contentWidth to size its contentItem (ListView), and the contentWidth is, as mentioned, 100: the implicit width of the button. So, the button ends up hanging over the side of the box, as it's larger than the box thinks it is. This problem is fixed by setting DialogButtonBox's contentWidth to the contentWidth of the contentItem (ListView). This makes DialogButtonBox use the explicit widths of the buttons rather than their implicit widths. Since the contentWidth is no longer implicit, we must also change any use of contentWidth in the implicitWidth binding to implicitContentWidth. While writing auto tests for this, they caught an issue where contentWidth wasn't updated, so now we call resizeContent() in QQuickContainer::setContentWidth(). Change-Id: I99ffda21b47aeb14d4382e453e87c4312f343a1c Fixes: QTBUG-72886 Fixes: QTBUG-73860 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-126-17/+201
|\| | | | | | | | | | | Change-Id: I79759d4101b5267c5d9d74ccb81e994da002b0ef
| * | Fix SplitView crash when using certain attached propertiesv5.13.0-beta1Mitch Curtis2019-03-111-7/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the attached property object was created on an item that SplitView doesn't manage, then its m_splitView member will be null, so check for that. Sometimes, an attached SplitView object will be created on an item that SplitView _does_ manage, but SplitView's own contentItem hasn't been created yet (see the comment in the QQuickSplitViewAttached constructor). In that case the SplitView will see the item added as a child of its contentItem eventually, and we just have to wait. While we are waiting, check access to our members in case they are null. Fixes: QTBUG-74276 Change-Id: I70b7f017e621e0d15c239b962f0407743eb70b15 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-092-0/+154
| |\| | | | | | | | | | Change-Id: I34009799fe4016339920a7f0884af4dbe6d71418