你知道为什么“@if ($nextRegistration->participants->registration_type->contains('certificate_available', 'Y')) [”显示"Property [registrationType] does not exist on this collection instance“吗?
为什么?因为这是重构的噩梦。想象一下,由于某种原因,不得不更改方法名称。软件将会出现故障,我必须在stderr中注意到该方法并不存在。我使用QTimer。我喜欢这一点是,你可以用一个lambda/bind替换&ClassName::methodName部分,它仍然会绑定到正确的对象(以防我需要在QThread中使用它),并使用我们在标准C++中理解的预期变量引用singleShot(0, threadObject, [this, pa