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

Better support usage of user data in QComboBox

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.2.0
    • None

    Description

      QComboBox has a feature that allows supplying user data that is stored in QVariants. This user data is very useful since it directly links any processable and meaningful value to the user selection. This allows intuitive, compact and easy to maintain code. Unfortunately QComboBox does not provide a signal that emits the user value (it only provides text and index based signals).

      This makes the user-data feature a bit of a pain on the reactive side. Also the user data feature can not be used at all if the QComboBox is constructed as part of an anonymous widget (without a derived class for the parent widget) because no reference to the QComboBox exists that would allow index->userdata lookup.

      Please add new signals that emit the user data as a QVariant.

      Attachments

        Issue Links

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

          Activity

            People

              peppe Giuseppe D'Angelo
              silicomancer Bernhard Lindner
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes