Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12, 6.6.0 RC
-
None
Description
The various ItemDelegate/MenuItem/Button implementations internally use QQuickMnemonicLabel to render the text property. While this is ok for Menus and Buttons this causes problems for other use cases when an ItemDelegate is used for showing model data with a ListView (which is the ItemDelegate use case after all).
The ComboBox implementation also shows this problem, just open the example's combobox popup.
AbstractButton should have a property that controls whether the default contentItem uses mnemonics or not (defaulting to true for actual button implementations and to false for ItemDelegate etc).
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.12 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") ListView { anchors.fill: parent model: ["This & That", "Cat & Dog"] delegate: ItemDelegate { text: modelData } } ComboBox { anchors.centerIn: parent model: ["This & That", "Cat & Dog"] } }
Attachments
Issue Links
- relates to
-
QTBUG-63361 A string of multiple ampersands treated unexpectedly by menubar/menu on macOS
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-73087 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
515486,3 | QQuickAbstractButton: Add property to enable/disable mnemonics support | dev | qt/qtdeclarative | Status: NEW | -1 | 0 |