Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-3863

uic-generated retranslateUI() discards current item selection in comboboxes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 4.5.0
    • Tools: Designer
    • None

      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:

      1. 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.
      2. 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.
      3. reject the issue. if the user cares, he can implement variant 1. manually.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kleint Friedemann Kleint
            admin Administrator
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes