Connecting QC with QTP using scripting (borrowed from http://jiteshsojitra.blogspot.in/)
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible = True
qtApp.TDConnection. Connect "URL", "DOMAIN", "PROJECT", "USERNAME", "PASSWORD", False
'Further code here
qtApp .Disconnect
qtApp .Logout
Set qtApp =nothing