Bug 514218 - FormTextFieldDelegate: binding of text property breaks in TextField's onTextChanged
Summary: FormTextFieldDelegate: binding of text property breaks in TextField's onTextC...
Status: REPORTED
Alias: None
Product: kirigami-addons
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 1.10.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-06 09:32 UTC by george fb
Modified: 2026-01-06 09:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description george fb 2026-01-06 09:32:24 UTC
SUMMARY

```
FormCard.FormTextFieldDelegate {
    id: tfd
    label: "ABC"
    text: btn.data // this binding breaks
    
    trailing: Button {
        id: btn
        property string data: "abc"
        text: data
        onClicked: btn.data = btn.data+"1"
    }
}
```

The binding is broken in FormCard.FormTextFieldDelegate.qml
https://invent.kde.org/libraries/kirigami-addons/-/blob/313d7c83a105bcb9aa3a3fac0941b5d5c2c6730d/src/formcard/FormTextFieldDelegate.qml#L301

STEPS TO REPRODUCE
1. run above sample 
2. click button

OBSERVED RESULT
button text changes, but FormTextFieldDelegate text doesn't change

EXPECTED RESULT
FormTextFieldDelegate text changes too

SOFTWARE/OS VERSIONS
Operating System: CachyOS Linux 
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.21.0
Qt Version: 6.10.1
Kernel Version: 6.18.3-arch1-1 (64-bit)
Graphics Platform: Wayland

POSSIBLE SOLUTIONS

Using Synchronizer 
https://doc.qt.io/qt-6/qml-qt-labs-synchronizer-synchronizer.html

```
AbstractFormDelegate {
    id: root

    TextField {
        id: textField
        
        // text: root.text
        // onTextChanged: root.text = text
        Synchronizer on text {
            property alias source: root.text
        }
    }
}
```

Using an alias for textField.text

```
AbstractFormDelegate {
    id: root
    property alias fieldText: textField.text

    TextField {
        id: textField
        
        // text: root.text
        // onTextChanged: root.text = text
    }
}
```