Hi Alex, our usual recommendation is to have different containers for Sandbox and Production, and create test Salesforce.qvs connstring in sandbox and another Salesforce.qvs connstring in the production container. Then when you move the app it will hook into the correct connstring.
You can read about this in the Qlik Deployment Framework Deployment Guide, page 6
Hope that this helps.
Thanks Magnus, we have decided to use a slightly different solution. A global variable is declared in the shared folders called environment, with a value of Production in the production container, and Sandbox in the sandbox area. We then have a connection string .qvs with a conditional using the global variable environment to decide which connection to make.