This caused a crash with Qt 5.3 dev branch as the widgets are null before setupUi is called. Might be a bug in Qt but still it makes sense to first call setupUi and then do further changes to the Ui.