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

QComboBox crashes after calling clear() and re-add items

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1: Critical P1: Critical
    • 6.6.2
    • 6.6.1
    • None
    • macOS

      QComboBox crashes application after calling `clear()` and then re-add some items. 

      Minimal sample to reproduce it attached below. 

       

      However, I do find giving QComboBox a view, e.g. calling `setView(new QListView);` before adding items fix this problem.

      It doesn't, it reduces the chances of crash from 100% to 50% of the time. 

       

      Update: setView(new QListWidget) worked.  

        1. untitled.zip
          3 kB
          Qihao Cheng
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            vhilshei Volker Hilsheimer
            qihao Qihao Cheng
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes