Displayed Checkbox state not correct when added to a Layout


I’ve got a form with a Checkbox and some other fields. This form is shown in a window if a button in another form (let me call it ‘parent’) is clicked. The Checkbox is not shown in the new window, but after closing that window: The ‘parent’ form will add the Checkbox and some other components of the ‘child’ form in one of it’s layout components.

The problem is that the Checkbox should be shown in an activated state, but it is not. Despite internally being activated, as I could see in the debugger. Only after clicking another button in the surrounding Layout, which opens another window and then closing that one, the Checkbox is displayed correctly marked.

It seems that the addition to the Layout
setting the Checkbox value causes the trouble. Another Checkbox in the same Layout, which is constantly displayed and which value is set in a similar fashion via the same ‘child’ form class, displays the check mark instantly.

How can this be fixed?