A call to QTreeWidget::clear() does not affect the column count. This needs to be handled separately. BUG: 428434
mentioned in commit 7323b85a