I have a non-modal dialog, made with QT.
When I run it, it appears as I wanted it, but when I switch to another document, the dialog is still visible (also if I switch to the macro-Editor).
It should only be visible in the document, where I called it.
What to do?
Code: Select all
import PySide from PySide import QtGui ,QtCore from PySide.QtGui import * from PySide.QtCore import * pfad = "C:/...... .ui" d = QtGui.QWidget() # or d = QtGui.QDialog(), I see no difference d.ui=FreeCADGui.PySideUic.loadUi(pfad) mw = FreeCADGui.getMainWindow() mdi = mw.findChild( QtGui.QMdiArea ) swa = mdi.activeSubWindow() d.ui.setParent(swa) d.ui.setWindowFlags(QtCore.Qt.Window) d.ui.show()