title: How to Install qt4 on macOS with homebrew?
body: <p>I need to install the qt4 C++ framework for one of my classes. I tried using the regular installer from the download archives page for both qt4.7 and qt4.8, however I get the warning: </p>
  
  <pre><code>"Installing this package may damage your system, and the installation may fail."
  </code></pre>
  
  <p>So I looked into installing it via homebrew and initially tried:</p>
  
  <pre><code>brew tap cartr/qt4
  brew tap-pin cartr/qt4
  brew install qt@4
  </code></pre>
  
  <p>However, that gives me this error:</p>
  
  <pre><code>Error: Calling brew tap-pin user/tap is disabled! Use fully-scoped user/tap/formula naming instead.
  </code></pre>
  
  <p>I looked online for a solution and was able to install it by omitting the <code>brew tap-pin cartr/qt4</code> command:</p>
  
  <pre><code>brew tap cartr/qt4
  brew install qt@4
  </code></pre>
  
  <p>I then tried to create a sample qt program in the CLion IDE and checked the version I was using, and it said I was using qt5 (from the python anaconda distribution). So my question is, can I install both qt4 and qt5 on my system simultaneously? How do I select which version to use?</p>