Hi info865,
Welcome to the Community. QuickBooks is a versatile program that helps you streamline your work using the powerful features offered in the program. Rest assured, I'll be happy to share more info so you're on the right track.
The function you've described isn't available in QuickBooks as you'd have to manually enter the payroll costs to the project in question. I can see the benefit of having this function for your business and I encourage you to send feedback about this to our engineers. You can send feedback by clicking on the Gear icon and looking for Feedback. In the meantime, here a helpful article with info on how to: Create and manage projects in QuickBooks Online.
Let me know if you have other questions by leaving a comment below. I'll be here to help.