cleanup code with qtwidget2