title: Python & PyQt4 - a program with plugins. Can't connect signals from plugins to UI
body: <p>I'm writing a program in Python and PyQt4 with plugins support. Plugins are loaded at startup (with <code>__import__</code>), adding elements to UI (i.e. adding a new tab to tab widget, methods from mainclass exposed and everything is working at this point). My problem is signal ignoring, i.e:</p>
  
  <pre><code>from lib.plugin import Plugin
  from plugins.dsc.ui import dsc_main
  
  class DSC(Plugin):
      def __init__(self):
          Plugin.__init__(self)
  
          # Load ui
          self.dsc_widget = QTabWidget()
          self.dsc_ui = dsc_main.Ui_Form()
          self.dsc_ui.setupUi(self.dsc_widget)
  
          # QWidget form contains a QListWidget, so filling it with
          # something.
          for x in range(0, 100):
              self.dsc_ui.list_widget.addItem(str(x))
  
          # This isn't working
          self.dsc_ui.list_widget.currentItemChanged.connect(self.show_data)
          # This also isn't working
          self.dsc_ui.list_widget.itemClicked.connect(self.show_data)
  
      def show_data(self):
          print "WUT?"
  </code></pre>
  
  <p>I've also tried qDebug instead of print, but no effect here. I've also tried connecting widgets from dsc_ui thru main form thread (by exposing a method that finds child this name and connect it to function), but this was also effectless.</p>
  
  <p>This question is similar to <a href="https://stackoverflow.com/questions/3827013/pyqt4-signal-slot-problem-when-using-sub-directories">this one</a>, but everything described in answer already tried.</p>
  
  <p>Is there any good way I missed?</p>