In the Q-Wah algorithm set the Mod Source to EXP PDL. On the H9, map a CC# to the Expression Pedal Value parameter in the MIDI settings. Make sure your MIDI controller is sending expression control information on the same MIDI channel and CC# you programmed.
You can find MIDI assignments on the H9 Control app under the Pedal tab > MIDI settings > Assign MIDI CC messages > Expression pedal value.