The derivation of the Q matrix is a separate topic and requires additional assumptions about the motion model and noise characteristics, which would have made the example significantly longer. I cover this topic in detail in the book.
I'll consider adding a brief explanation or reference to make that step clearer. Thanks for pointing this out.