Skip to content

[CheckBox] Rewrite to be nearly identical to RadioButton

Commit 1

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.

BUG: 435934 FIXED-IN: 5.82

Commit 2

Draw icon in QQStyleItem

Checkbox already knew how to do this, but it was doing so internally to itself. Let's move that logic to CheckDelegate.qml so that everything that uses it gains the same feature. This functionality can be optionally disabled in case a control using it already handles icon-drawing by itself.

CCBUG: 433433

There are no UI changes that I could detect, but please test, as this code is a bit unfamiliar to me.

cc @ndavis @davidre

Merge request reports