connect() takes object pointers (adresses) as arguments. As your widget is stack based, you need operator & to pass an address, so just change widget to &widget in the statement:
@
// WRONG
QObject::connect(button, SIGNAL(clicked()), widget, SLOT(show());
// right
QObject::connect(button, SIGNAL(clicked()), &widget, SLOT(show());
@