Bug 422461 - FormLayout ignores Kirigami.FormData.buddyFor
Summary: FormLayout ignores Kirigami.FormData.buddyFor
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: Master
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-06-04 20:22 UTC by Rinigus
Modified: 2020-09-15 23:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rinigus 2020-06-04 20:22:13 UTC
SUMMARY

Kirigami.FormData.buddyFor could be used to align label with an element in the form. Not sure when it changed, but it doesn't work anymore.

STEPS TO REPRODUCE

Simplest example would be from Kirigami Gallery app. In FormLayoutGallery, use the following with the radio buttons:

```
            ColumnLayout {
                Layout.rowSpan: 3
                Kirigami.FormData.label: "Label for radios:"
                Kirigami.FormData.buddyFor: firstRadio
                RadioButton {
                    checked: true
                    text: "One"
                }
                RadioButton {
                    text: "Two"
                }
                RadioButton {
                    id: firstRadio
                    text: "Three"
                }
            }
```

Notice that the `firstRadio` id is moved to the last RadioButton. Unfortunately, label is still aligned by the top.

I have not tested it in the Gallery app, but used it in Pure Maps. There the functionality got broken and noticed.


SOFTWARE/OS VERSIONS
KDE Frameworks Version: kde-frameworks/kirigami 5.70
Qt Version: 5.14.2
Comment 1 Marco Martin 2020-06-30 10:27:09 UTC
I don't think that ever worked.
buddyfor was designed to have the same meaning as QWidget's form layout buddies, its scope is to give focus to its buddie when the label is activated with own accelerator, for instance when the text contains an &
Comment 2 Nate Graham 2020-09-15 23:41:39 UTC
This exact thing is working as expected in Kirigami Gallery now on the Form Layout page. If it's still not working in Pure Maps, can you share the code that isn't working?