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

QListWidget: QAbstractItemView calls setCurrentIndex in focusInEvent which causes an extra currentRowChanged signal if the focus is caused by mouse-clicking on the index other than the first one.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.0
    • 3.x, 4.5.3
    • Widgets: Itemviews
    • None
    • 83b8d1aef2a840838bbe530794e1dd004e3a22d5

    Description

      If user clicks one item in the QListWidget other than the first one, two currentRowChanged signals are emitted, because one is emitted in QAbstractItemView::focusInEvent to set the first item to be current item, and then current item changes from the first one to the one clicked.

      Should consider the focus reason in the focusInEvent.

      test example attached

      Attachments

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

        Activity

          People

            vfm Thierry Bastian (closed Nokia identity) (Inactive)
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes