A call to QTreeWidget::clear() does not affect the column count. This needs to be handled separately. BUG: 428434 FIXED-IN: 5.1.1 (cherry picked from commit 2bc5474f)