Formation of interstellar cloud complexes, OB associations, and giant H II regions