Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.14.2
-
None
Description
QtQuick.Controls 2 glitches on buttons with &-shortcuts in text. To be precise, it parses ampersands more than once. Consider an showcase below:
import QtQuick.Controls 2.12 as QQC2 import QtQuick.Layouts 1.14 as L L.ColumnLayout { // OK: Label does not parse for ampersands QQC2.Label { text: "Rock & Roll" } // Err: amp is not shown, space is a shortcut QQC2.Button { text: "Rock && Roll" } // OK: Looks like on a label QQC2.Button { text: "Rock &&& Roll" } // OK: R is shortcut QQC2.Button { text: "Rock &&& &&Roll" } }
Documentation for QtWidget's QAbstractButton::text counterpart defines the rules for ampersand parsing: use double-ampersand to insert a one literal ampersand.
Documentation for QML AbstractButton.text counterpart does not mention ampersands at all, but parses them triple per one.