Bug 425865 - editable combobox fairly broken
Summary: editable combobox fairly broken
Status: RESOLVED FIXED
Alias: None
Product: frameworks-qqc2-desktop-style
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-27 12:17 UTC by Harald Sitter
Modified: 2020-10-13 15:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
main.qml (minimal example) (574 bytes, text/x-qml)
2020-08-27 12:17 UTC, Harald Sitter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2020-08-27 12:17:27 UTC
Created attachment 131216 [details]
main.qml (minimal example)

ComboBox{editable:true} is fairly broken with the org.kde.desktop style.
Auto completion isn't working.
When trying to click on the indicator to open the selection it doesn't stay open.

See attached example file.
- Try to type Bana and see it not offering autocompletion
- Click on indicator and see it not staying open

Works fine with fusion, universal and material style.
Comment 1 David Redondo 2020-08-28 08:49:24 UTC
See https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/19 for the second issue
Comment 2 Chris Holland 2020-10-13 15:13:18 UTC
Git commit 2d8d877373e088f94675a0d1fc969bf6dd048a26 by Chris Holland.
Committed on 13/10/2020 at 15:04.
Pushed by cholland into branch 'master'.

ComboBox.contentItem must be a QQuickTextInput to fix autocomplete

See QQuickComboBoxPrivate::updateEditText()
https://github.com/qt/qtquickcontrols2/blob/dev/src/quicktemplates2/qquickcombobox.cpp#L426

By removing the MouseArea previously in the contentItem, we lose the
ability to press+hold+drag to select a drop down item.

A MouseArea has been added to the background component to capture
wheel events in a similar pattern to PlasmaComponents3.ComboBox.

The ComboBox previously closed the popup when releasing the click to
open the dropdown when editable=true.

M  +56   -107  org.kde.desktop/ComboBox.qml
M  +7    -0    tests/testComboBox.qml

https://invent.kde.org/frameworks/qqc2-desktop-style/commit/2d8d877373e088f94675a0d1fc969bf6dd048a26