Form factors of heavy mesons in QCD