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

QComboBox::setLineEdit not setting focuspolicy on OS X

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.2
    • 5.3.0
    • None
    • OS X 10.9.2
    • macOS
    • 6b15a5a869e6180a000751958def1cf485c23f68

    Description

      On OS X QComboBox::init() sets focus policy to Qt::TabFocus. QComboBox::setLineEdit does not change the focus policy. Therefore, if you call setEditable after setLineEdit the focus policy is never changed from TabFocus, leaving you with a broken combo box that does not receive input focus on mouse clicks.

      In Qt 4.8.x calling setEditable() after setLineEdit worked fine. In fact calling only setLineEdit() without setEditable() also worked.

      The fix is to either have setLineEdit() change the focu policy itself or have it call setEditable().

      Attachments

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

        Activity

          People

            liaqi Liang Qi
            kovid Kovid Goyal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes