View Single Post
helex's Avatar
Posts: 543 | Thanked: 802 times | Joined on Apr 2010 @ Germany
#4
Thanks for your fast answer. :-)

Originally Posted by mikec View Post
Do something like this in your dialog

Code:
def on_backButton_clicked(self):
        #emit custom signal and pass some parameters back in self.config
     
        self.writeConfig()
        self.emit(SIGNAL("dialog closed"), self.config)
        self.close()
I guess I'm missing the point. :-(

The self.close() is the argument to close the Dialog, is that correct?

But with this minimalistic code in DialogTest.py it doesn't work:

Code:
class frmDialog(QtGui.QDialog):
  def __init__(self, parent=None):
    QtGui.QWidget.__init__(self, parent)
    self.ui = Ui_Dialog()
    self.ui.setupUi(self)

  def reject(self):
    print "reject"
    self.close()
    
  def accept(self):
    print "accept"
    self.close()
I get only "reject" or "accept" on the command line. But the Window is still open.