title: How to define constants in Qt Creator for different Build Settings?
body: <p>I'm developing an app in Qt which connects with a server. I have a production server and a preproduction server so it would be great to be able to change the URL the app use based in the build.</p>
  
  <p>So, summing up, I would need the app to behave like this:</p>
  
  <p>Debug configuration</p>
  
  <pre><code>//somewhere in a .cpp file
  QString url = BASE_URL;
  // url now is, for example, "preproduction_server.com"
  </code></pre>
  
  <p>Release configuration</p>
  
  <pre><code>//in the same .cpp file
  QString url = BASE_URL;
  // url now is, for example, "production_server.com"
  </code></pre>
  
  <p>Any ideas? Should I define variables in the .pro file and use them? Define them as Environment variables?</p>