Here is the documentation: QTableWidget.sortItems
This is the function:
PySide6.QtWidgets.QTableWidget.sortItems(column[, order=Qt.AscendingOrder])
The following is my code:
self.notes_current_table_widget.sortItems(column[2, order=Qt.AscendingOrder])
PyCharm displays this as an error, when I try to run I get:
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
Syntax error is in regards to: order=Qt.AscendingOrder
I have tried on other QTableWidgets with the same issue. I have verified that the type is QTableWidget. I have updated all packages to the latest within the project. I have checked syntax of lines before and after.
I ran into this issue because I wanted to sort a dataframe and display the dataframe using a QTableWidget. df = dataframe. The dataframe is sorted until adding the df to the QTableWidget. That's when I looked at this QTableWidget.sortItems function. Any thoughts or ideas?