Replies: 2 comments
-
Managed to fix the problem, not sure if its the correct way of going about it but it works for me... TLDR; self.field_sub_container.delete_components() for self.field_sub_container.components.clear() I think the error was related to the components being deleted in the "delete_components" function but then I still had a reference to that component in the "input_fields" dictionary. So when I was re-adding the component after deletion there was something missing (I assume to do with event handling). Given that I don't really want to delete it and have it cleared from memory every time, it is fine for me to simply "remove" the component from the parent so it is not drawn, then re-add it when I want it to be drawn. |
Beta Was this translation helpful? Give feedback.
-
I think your analysis of the problem is correct. |
Beta Was this translation helpful? Give feedback.
-
Hi, I've been having an issue with QInput (specifically QInputChange but I have tested and seen the same behaviour with the normal QInput and QInputBlur).
Basically you can type what you want to but as soon as you click out of the input (or it loses focus) the text is removed. The most reliable way I have of reproducing the issue is by doing the following once the example code at the end is running:
When it happens the following error is thrown:
I've not been able to figure out why after searching around for a while, I think though it seems to be linked to the 'change' and 'blur' events that are on the QInput component by default. If I remove those event listeners through my browser developer tools then the problem goes away.
If anyone has had a similar issue, or can point out how I'm doing something wrong (most likely tbh) that'd be really appreciated!
Beta Was this translation helpful? Give feedback.
All reactions