added a visitor for QStackedWidget