Well, then you have to use QTableWidget::clearContents(). And header items are also items of the view, and the headers are connected to the contend I find it reasonable that clear clears both, header and content items.

Nevertheless, tough luck you lost a day!