title: What't the common way to support both PyQt4 and PyQt5 in one application?
body: <p>I want to make an application that will work with both PyQt4 and PyQt5.</p>
  
  <p>First of all I can create compatibility module <code>compat.py</code> that will fallback to PyQt4 if PyQt5 wasn't found:</p>
  
  <pre><code>try:
      __import__('PyQt5')
      use_pyqt5 = True
  except ImportError:
      use_pyqt5 = False
  
  if use_pyqt5:
      from PyQt5.QtGui import QIcon as QIcon
  else:
      from PyQt4.QtGui import QIcon as QIcon
  </code></pre>
  
  <p>After that I can import Qt-related classes from that module and check <code>compat.use_pyqt5</code> where PyQt4/5 has difference in logic.</p>
  
  <p>Problem is that I want to make Qt version configurable and dependent on command-line options - and they're loaded in different module.</p>