I have a QF LH LH QF booking
Both QF and LH use Amadeus system = they see each others' segments - call QF and/or LH and ask agent to insert your FF numbers. Agent should know the entry, just in case it is:
FFNUA-xxxxxxx where xxxxxxx is your UA MP number
FFNQF-yyyyyyy where yyyyyyy is your QF FF number
(no segment selection is necessary - Amadeus will assign FF number to correct segments, if there are more than one passenger in the reservation they need to name select i.e. add /P1 - to assign FF number to the first passenger).