title: maya standalone with pyside2
body: <p>When I want to add a QtWidget in maya standalone, error says &quot;QWidget: Cannot create a QWidget without QApplication&quot;.</p>
  <pre><code>from PySide2 import QtWidgets
  import maya.standalone
  maya.standalone.initialize()
  
  QtWidgets.QPushButton()
  
  maya.standalone.uninitialize()
  </code></pre>
  <p>then I add a QApplication,error says: &quot;A QApplication instance already exists.&quot;</p>
  <pre><code>from PySide2 import QtWidgets
  import maya.standalone
  import sys
  maya.standalone.initialize()
  
  QtWidgets.QApplication(sys.argv)
  QtWidgets.QPushButton()
  
  maya.standalone.uninitialize()
  </code></pre>
  <p>I use <code>QApplication.instance()</code> I can get a 'QGuiApplication' reference,so
  I know that maya.standalone() which will create the qApp, but how to create a QWidget(such a s dialog...)</p>
  <p>================================================================</p>
  <pre><code>from PySide2 import QtWidgets
  import maya.standalone
  maya.standalone.initialize()
  print(QtWidgets.QApplication.instance())     
  maya.standalone.uninitialize()
  </code></pre>
  <p>This is the full log:</p>
  <pre><code>pymel.core : INFO : Updating pymel with pre-loaded plugins: renderSetup
  Warning: file: C:/Program Files/Autodesk/Maya2018/scripts/startup/initialStartup.mel line 179: Y-axis is already the Up-axis
  Warning: file: C:\Users\a\Documents\maya\2018\prefs\filePathEditorRegistryPrefs.mel line 4: filePathEditor: Attribute 'aiImage.filename' is invalid or is not designated 'usedAsFilename'.
  Warning: file: C:\Users\a\Documents\maya\2018\prefs\filePathEditorRegistryPrefs.mel line 5: filePathEditor: Attribute 'aiPhotometricLight.aiFilename' is invalid or is not designated 
  'usedAsFilename'.
  Warning: file: C:\Users\a\Documents\maya\2018\prefs\filePathEditorRegistryPrefs.mel line 6: filePathEditor: Attribute 'aiStandIn.dso' is invalid or is not designated 'usedAsFilename'.
  Warning: file: C:\Users\a\Documents\maya\2018\prefs\filePathEditorRegistryPrefs.mel line 7: filePathEditor: Attribute 'aiVolume.filename' is invalid or is not designated 'usedAsFilename'.
  AbcExport v1.0 using Alembic 1.7.5 (built Feb  6 2018 18:28:08)
  Initialized VP2.0 renderer {
    Version : 2016.11.40.12. Feature Level 5.
    Adapter : GeForce RTX 3090/PCIe/SSE2
    Vendor ID: 4318. Device ID : 8708
    Driver : .
    API : OpenGL V.4.6.
    Max texture size : 16384 * 16384.
    Max tex coords : 32
    Shader versions supported (Vertex: 5, Geometry: 5, Pixel 5).
    Shader compiler profile : (Best card profile)
    Active stereo support available : 0
    GPU Memory Limit : 24576 MB.
    CPU Memory Limit: 62178.5 MB.
    MultiDraw consolidation: enabled
  }
  OpenCL evaluator is attempting to initialize OpenCL.
  Detected 1 OpenCL Platforms: 
   0: NVIDIA Corporation. NVIDIA CUDA. OpenCL 1.2 CUDA 11.2.162.
   Supported extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_d3d10_sharing cl_khr_d3d10_sharing cl_nv_d3d11_sharing cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_device_uuid
  OpenCL evaluator choosing OpenCL platform NVIDIA Corporation.
  OpenCL evaluator is unable to find a GPU device that can share VBOs with OpenGL.
  Warning: file: C:/Program Files/Autodesk/Maya2018/scripts/startup/autoLoadPlugin.mel line 35: Loading plug-in &quot;lookdevKit&quot; has resulted in changes to the scene that may need to be saved.
  AbcImport v1.0 using Alembic 1.7.5 (built Feb  6 2018 18:28:08)
  
  &lt;PySide2.QtGui.QGuiApplication object at 0x000001828E9D9108&gt;
  </code></pre>