运行时错误: 内部C++对象(PySide.QtGui.QWidget)已删除

2024-06-25 22:48:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在用PySide开发MotionBuilder的用户界面,但是得到了这个包

def getMobuWindow():
    parent = QtGui.QApplication.activeWindow()
    while parent.parentWidget() is not None:
        parent = parent.parentWidget()
    return parent
getMobuWindow()

RuntimeError: Internal C++ object (PySide.QtGui.QWidget) already deleted.

我查了一些关于它的话题,但我不知道如何处理。有人知道吗?在


Tags: nonereturnisdefnot用户界面parentpyside