I'd like to exchange a widget inside a QHBoxLayout. This code seems to work, but as soon as I do the actual app._exec()
, the code crashes with terminate called after throwing an instance of 'boost::python::error_already_set'
. Is there any way to get the actual error message? (or to resolve this problem)
gaParent = gameArea.parent().layout()
gaParent.removeWidget(gameArea)
gameArea = DrawingScreen()
gameArea.setObjectName("gameArea")
gaParent.insertWidget(0, gameArea)