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

QColumnView setCurrentIndex does not set the selection properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 4.8.7, 5.5.1
    • Widgets: Itemviews
    • None
    • linux qt 4.8.7

    Description

      With my QColumnView as in

      ,

      and after running the following code:

      auto* model = qvc->model();
      auto browse_to_idx = model->index(1,0);
      auto browse_to_idx1 = model->index(0,0, browse_to_idx);
      auto browse_to_idx2 = model->index(0,0, browse_to_idx1);
      auto browse_to_idx3 = model->index(0,0, browse_to_idx2);
      auto browse_to_idx4 = model->index(3,0, browse_to_idx3);
      qvc->setCurrentIndex(browse_to_idx4);

      I obtain the following selection

      The left-most column is not properly set. The others are correct.

      Is there something missing from the code to get the left-most column to properly select the row with index 1 ?

      Attachments

        1. after.jpg
          after.jpg
          76 kB
        2. before.jpg
          before.jpg
          42 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            finjulhich MM
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes