When the code checks for QApplication, also check the arguments in order to see of this instance comes from the host, and not has been created by other Qt plugins. If that plugin (X) that created the QApplication will delete the instance of QApplication when user closes the window for X plugin, all the rest Qt plugins windows opened will crash.
When the code checks for QApplication, also check the arguments in order to see of this instance comes from the host, and not has been created by other Qt plugins. If that plugin (X) that created the QApplication will delete the instance of QApplication when user closes the window for X plugin, all the rest Qt plugins windows opened will crash.