So the text just gets cut off instead. Trivial test case: import QtQuick 2.15 import QtQuick.Controls 2.15 as QQC2 Item { width: 400 height: 200 QQC2.CheckBox { anchors { verticalCenter: parent.verticalCenter left: parent.left right: parent.right margins: 10 } text: "This is a very long piece of text that really should be rewritten to be shorter, but sometimes life just isn't that simple." } }
This is probably caused by using a QQuickStyleItem to render the whole control. So the text gets rendered by that element and fails to be affected by any of the typical text constraints.
RadioButton.qml seems to be implemented with only the radio button itself using a QQuickStyleItem, and the label, mnemonic, and focus indicator are done in QML. Perhaps we need to do the same for CheckBox.qml.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/67
Git commit fd336cfb1125d26b4c75158c8bd412a030932b9b by Nate Graham. Committed on 19/04/2021 at 20:52. Pushed by ngraham into branch 'master'. [CheckBox] Rewrite to be nearly identical to RadioButton Right now CheckBox uses a QQuickStyleItem to render the whole control. This breaks its ability to elide long text. This commit implements it in the same way as RadioButton, which fixes elision. FIXED-IN: 5.82 M +46 -22 org.kde.desktop/CheckBox.qml https://invent.kde.org/frameworks/qqc2-desktop-style/commit/fd336cfb1125d26b4c75158c8bd412a030932b9b