QTableView doesn't connect to QHeaderView::sortIndicatorChanged until you call QTableView::setSortingEnabled(true). Because signal/slot connections are processed in the order they're made, if you connect to sortIndicatorChanged before enabling sorting, your slot gets invoked before the table is sorted
This is an acceptible and useful behavior except its not fucking documented and I had to read the source code to see why I was always a step behind
