Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
4.4.0
-
None
Description
Imagine the following scenario: one wants to add history collection of the user's choices through a combo box.
Unfortunately, since setCurrentIndex() isn't virtual, there is no simple way to add a new choice to the history when the index is set.
Some tricks can be done, like overriding hidePopup(), but it is done before the new index is set and it is pointless.
The activated() signal can be intercepted, but that's no good either.
If several objects are listening to this signal too, since they may intercept it earlier, they won't get the most recent history and that is unacceptable.
Some more virtual methods would be useful, so QComboBox could inherited and allow the creation of a nice and elegant class.