I have a class "andocken" which calls a Dialogwindow. (The dialogwindow is another class (Ui_Dialog) in a another file (andock_diag.py) )
In "Further code" a Snapper.Getpoint loop asks for several pick points, after every pick the point is sent and displayed in the Window Dialog.
Code: Select all
class andocken: def __init__(self,val): import bkNeu_diag reload(bkNeu_diag) self.d = QtGui.QDialog(FreeCADGui.getMainWindow()) self.d.ui=andock_diag.Ui_Dialog() self.d.ui.setupUi(self.d, pipeout) self.d.show() ### Further Code ........ ad = andocken(1)
When all the needed points are clicked, the dialog window closes and "docking" goes on.
But what if I don't want to pick any more in between?
In the dialog box there is a button "Cancel" and if the is clicked, the complete program should be canceled (also the pick loop)
Maybe call the dialog box with: d.ui.setupUi(self.d, self) and receive in dialog with def setupUi(self, dialog, ID)?
But what next? ID.close() does not work
Thanks for help