Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.11.1
-
None
-
02663718a9da95968a7879b792508b8c0ae699b2
Description
I'm using PyQt 5.11.2 for Windows 10 (x64), when the table has more than 1000 rows in it (3000 rows for example), if I hide some of the rows and then call sortItems() or sortByColumn(), those hidden rows with a row number larger than 1001 become visible automatically while others remain hidden. Is this a bug?
A code snippet to reproduce the issue:
import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * if __name__ == '__main__': app = QApplication(sys.argv) test = QMainWindow() table = QTableWidget() table.setRowCount(3000) table.setColumnCount(3) for i in range(table.rowCount()): table.setItem(i, 0, QTableWidgetItem()) table.item(i, 0).setData(Qt.DisplayRole, i) table.hideRow(i) table.sortByColumn(0, Qt.AscendingOrder) test.setCentralWidget(table) test.show() sys.exit(app.exec())