Answer:
$$
8 \sqrt{11}
$$

Solution:
Note that $A$ is the excenter of $\triangle D E F$ and $A Q$ is the length of the exradius. Let $T$ be the tangency point of the $A$-excircle to line $D F$. We have $A Q=A T=20$. It is well known that the length of $D T$ is the semiperimeter of $D E F$. Note that $\triangle A D T$ is a right triangle, so
$$
A T^{2}+D T^{2}=A D^{2}
$$
which implies
$$
D T=\sqrt{24^{2}-20^{2}}=4 \sqrt{11} .
$$

Thus, the perimeter of $\triangle D E F$ is $2 \cdot 4 \sqrt{11}=8 \sqrt{11}$.
7. Let $A B C$ be an acute triangle. Let $D, E$, and $F$ be the feet of altitudes from $A, B$, and $C$ to sides $\overline{B C}$, $\overline{C A}$, and $\overline{A B}$, respectively, and let $Q$ be the foot of altitude from $A$ to line $E F$. Given that $A Q=20$, $B C=15$, and $A D=24$, compute the perimeter of triangle $D E F$.