I haven't used this personally, but found this very quickly via google search for "qt oauth2":

https://github.com/cybercatalyst/qtoauth2

Might be worth looking at.