Hadroproduction of heavy quark flavors in QCD