Is it possible to set a keyboard layout per app?
I've found a better way of dealing with things than setting a keyboard layout per app, and this is with the excellent Karabiner keyboard customiser.

Simply set the system keyboard to QWERTY, and enable the Karabiner option 'QWERTY to Dvorak'. The only caveat is you have to remember to log in with QWERTY as Karabiner can only start once you have logged in.