Quote: "The signal/slot mechanism may be nice in C++, but in Python it very 
much fails to take advantage of the facilities of the language"
I'm not quite sure what you mean by this. I think the PyQt takes very much 
advantage of pythons fascilities. I fail to see how it can be much easier than 
it is presently. In PyQt it further more possible to create connections to non 
QObject subclassed instances. Example:

class MyExporter:
  def __init__(self):
    ...

  def start(self):
    ... do the export


class ExportDialog(QtGui.QDialog, Ui_CreateGroupWizard):
  def __init__(self,exporter,parent=None):
    self.setupUi(self)
    self.initConnections(exporter)


  def initConnections(exporter):
    # connect signal to self
    self.connect(self.led_groupname,QtCore.SIGNAL("textChanged(const 
QString&)"),self.checkName)

    # connect signal to non QMetaObject class method (not possible in C++, 
which suggests that RiverBank
    # has indeed taken steps towards utilizing the wonders of python)
    self.connect(self.btn_export,QtCore.SIGNAL("clicked()"), exporter.start)


  def checkName(self,name):
    ... do stuff


Best Regards Jakob Simon-Gaarde

-- 
prepare disk space contains "usertrap"
https://bugs.launchpad.net/bugs/85980
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to