A QApplication instance already exists

前端 未结 3 1947
死守一世寂寞
死守一世寂寞 2021-01-03 00:33

I\'m doing some simple PySide on 3Dsmax 2015.

This is my error:

python.ExecuteFile \"C:\\Program Files\\Autodesk\\3ds Max 2015\\scripts\\Python\\dem         


        
3条回答
  •  無奈伤痛
    2021-01-03 00:54

    You're creating an instance of QApplication in the line:

    app = QApplication(sys.argv)
    

    And getting that error because there's another instance of QApplication created somewhere before that (presumably somewhere in "3Dsmax 2015 Listener") and you're only allowed one.

    See:

    QT documentation on QApplication

提交回复
热议问题