title: Separating GUI from main code
body: <p>I'm trying to improve my coding method, and one thing I would like to try is to take a TDD approach. I read quite few articles and tutorials about it, but as often, without practical examples or testing, this won't stay long in my brain and I will miss lots of fine details.</p>
  
  <p>That's why I'm trying to develop a simple application to make files and directory research in folders. However, here is my problem: I would like to use a GUI, and not a console like application.</p>
  
  <p>I have already been using PySide for other application and I know its basics, but I always avoided bothering with separating UI and main app features (I know, very bad !)</p>
  
  <p>For a TDD approach, I think this is the right time to learn how to do it. Indeed, I could read that to do TDD with GUI, the graphical part must, logically, just be a "bonus layer", added on the top of the logic, and that the tests should first test internal logic, and then that the developer can test UI more or less manually...</p>
  
  <p>So here is the question: how to separate my UI class (derivating from a class generated using pyside-uic) from the rest of my program and how can I make them communicate (for simple application data IO only then)? How can I emit and use signals outside of this class?</p>
  
  <p>Thanks in advance for your help and advice, hoping I'm beeing understandable with my English writting!</p>
  
  <p>Manu</p>
  
  <hr>
  
  <p>EDIT: My first thoughts and readings are going through subclassing QThread and communicate with signal/slot mechanism... Is this absolutely necessary and the only way to do it?</p>