title: PyQt Multiple Windows - how to pass functions between modules Qt Designer
body: <p>I'll start with the question and then try to explain:
  Is there a way for an imported module to call a function in the module that imports it?</p>
  
  <p>I am just learning to use Qt and am starting with Qt Designer to get some fundamentals worked out.</p>
  
  <p>I have figured out how to create more than one ".ui" file in order to get the code for multiple windows and have managed to work out how to call the multiple windows from a main application by importing the code for the two windows.</p>
  
  <p>For example, starting with win1.ui and win2.ui I create win1.py and win2.py - from my main application I import win1 and win2...</p>
  
  <p>Note - I got this far by following this simple tutorial : <a href="http://www.youtube.com/watch?v=bHsC6WJsK-U&amp;list=PLF4575388795F2531&amp;index=10&amp;feature=plpp_video" rel="nofollow">http://www.youtube.com/watch?v=bHsC6WJsK-U&amp;list=PLF4575388795F2531&amp;index=10&amp;feature=plpp_video</a></p>
  
  <p>OK - now the question. If I have a button in win2, I know how to link that button to a function in the win2.py code. What I don't know how to do is link the button in win2 to a function in my main application.</p>
  
  <p>My only thought would be to add a function as an argument to the class that sets up the second window but if I do that then any changes to win2.ui will wreck the code that I have changed.</p>
  
  <p>Thus, Is there a way for an imported module to call a function in the module that imports it?</p>
  
  <p>I hope this is clear without adding a bunch of code that isn't really relevant...</p>