QHeaderView.restoreState() leads to a broken table view when restoring data from different Qt major versions