<html>
  <head>
  </head>
  <body>Oh.  Duh.  :-) up until nowi had always inherited a qwidget. Thanks. <br>
-- <br>
Sent from my Android phone with GMX Mail. Please excuse my brevity.<br><br><div class="gmail_quote">Alan Ezust <alan.ezust@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

    <div>
      <div>
        <div>
          You can only have pyqtSignal() on classes that are derived from QObject.<br/>
        </div>
        <br/>
      </div>
      def Class(QObject):<br/>
      <br/>
    </div>
    <div class="gmail_extra">
      <br/>
      <div class="gmail_quote">
        On Sat, Feb 28, 2015 at 4:48 PM, Jason H<span> <<a href="mailto:jhihn@gmx.com" target="_blank">jhihn@gmx.com</a>></span> wrote:<br/>
        <blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">
          How can I make the connection in Other.run()? The two approaches I tried get the errors in the comments.<br/>
          <br/>
          Thanks<br/>
          <br/>
          class.py----<br/>
          class Class:<br/>
                  doneVis1 = pyqtSignal()<br/>
                  doneVis2 = pyqtSignal()<br/>
          <br/>
          other.py-----<br/>
          class Other:<br/>
                  def run(self):<br/>
                          self.script = __import__('class')<br/>
                          self.c = self.script.Class()<br/>
                          self.c.doneVis1.connect(self.doneVis1) #TypeError: instance cannot be converted to PyQt5.QtCore.QObject in this context<br/>
                          self.script.Class.doneVis2.connect(self.doneVis2) #AttributeError: 'PyQt5.QtCore.pyqtSignal' object has no attribute 'connect'<br/>
                          c.run()<br/>
                  def doneVis1(self):<br/>
                          pass<br/>
                  def doneVis2(self):<br/>
                          pass<br/>
          _______________________________________________<br/>
          PyQt mailing list   <a href="mailto:PyQt@riverbankcomputing.com" target="_blank"> PyQt@riverbankcomputing.com</a><br/>
          <a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a>
        </blockquote>
      </div>
      <br/>
    </div>
  </blockquote></div></body>
</html>