PySide2 application failed to start

前端 未结 2 1441
深忆病人
深忆病人 2021-01-01 05:08

I just tried to test the newly released version of PySide2 (5.11) on Windows 10, 64 bit version. But the \"Hello World\" example does not work. I am using Python 3.6 with Py

2条回答
  •  生来不讨喜
    2021-01-01 05:24

    Try This :

    import sys,os
    import PySide2
    
    dirname = os.path.dirname(PySide2.__file__)
    plugin_path = os.path.join(dirname, 'plugins', 'platforms')
    os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = plugin_path
    
    # code ....... 
    # .......
    

提交回复
热议问题