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

Performance problem about QItemSelectionModel

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.9.0 FF
    • 5.12.0
    • Core: Item Models
    • None
    • Windows 10, Visual Studio 2017
    • Windows
    • bf1a2ba8e (dev), e4173bc7b (dev), a76ce7b19 (dev), 1b3a7d550 (dev)

    Description

      I have a QTableView which has thousands of rows. When I use QItemSelectionModel to select multiple rows at the same time, my application will become very lag until the selection status of the QTableView is cleared.
      However, if I use Ctrl + A to select all rows of the QTableView, the application's performance will not be affected at all.

      I make a simple project to test this problem (see attachment). 

      The project is a QWidget with a QTableView and a QPushButton. The QTableView has 10,000 rows. Press the button will trigger to select all rows of the QTableView by function selectAll().
      The function selectAll() has 4 methods to realize the selection work. Methods 1 & 2 will lead to lag. Methods 3 & 4 works as well as Ctrl + A.

      Specifically, if Method 1 or 2 is chosen, the application will be very slow when you tried to move/maximize/minimize the window.

      The ultimate goal is to select any rows programmatically, so I must find out the reason for the lag of Method 1 or 2.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            nextsaturday 王 彦磊
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes