Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.12.3, 5.12.4, 5.15.7, 6.2.1
Description
Setting "placeholderText" on the contentItem of a ComboBox does not have any effect.
ComboBox { id: comboCategory_ ... Component.onCompleted: { console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") console.log( "ContentItem is : " + comboCategory_.contentItem ) console.log( "placeholderText is: " + comboCategory_.contentItem.placeholderText ) comboCategory_.contentItem.placeholderText = "<category>" console.log( "placeholderText is: " + comboCategory_.contentItem.placeholderText ) console.log("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb") } }
The above prints as expected but the placeholder text is not shown on the control when the selection text is empty.
The attached qml file can be run to show the issue:
See the discussion on the mailing list for more information and context: https://lists.qt-project.org/pipermail/interest/2019-September/033732.html
PS: Setting the "selectByMouse" property on the contentItem works as expected (related to QTBUG-71406)
Attachments
Issue Links
- relates to
-
QTBUG-77979 Add placeholderText for editable ComboBoxes
- Reported
For Gerrit Dashboard: QTBUG-77978 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
284329,4 | WIP: ComboBox: add textField property | 5.15 | qt/qtquickcontrols2 | Status: ABANDONED | -2 | 0 |
284347,1 | WIP: ComboBox: add placeholderText | 5.15 | qt/qtquickcontrols2 | Status: DEFERRED | -2 | 0 |