The trust doesn't get the deduction. The recipients may or may not get the deduction depending on their individual income and other factors. The trust passes through the income to the recipients, and reports the income it has passed through that may qualify for the QBI deduction.