try deleteLater instead of del