Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
4.5.0
-
None
Description
the uic-generated retranslateUI() code just clears the combobox and re-inserts all items from scratch. in that process, the current item index is lost.
possible solutions:
- save the current index before re-populating the combobox and restore it afterwards. probably, signal emission of the underlying model should be suppressed during the entire process to avoid spurious index change notifications.
- don't clear the combobox, but reset the items' text property. that seems the overall cleaner approach (e.g., doesn't necessitate suppressing all signals), but generates a lot more code.
- reject the issue. if the user cares, he can implement variant 1. manually.