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

what about setReadOnly(bool) in QComboBox

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 4.7.4
    • None

    Description

      it would be nice for some applications to have a setReadOnly() functionality in QComboBox, as it is available in QLineEdit,

      i.e. if the QComboBox is set read-only, it is no longer possible to change it's contents, but it is not drawn disabled.

      I attatched a quick and dirty solution I came up with. It basically swallows all events (mouse wheel, key presses, popup) that would cause a change of the displayed value.

      It would be nice to also deacivate the drawing of the drop-down indicator when in read-only mode.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            jkriege2 Jan Krieger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes