Ownership transfer in ProjectWidget::setProject().
Don't use stack-allocated object in the example.