title: QT/C++ yet another issue about accessing UI files
body: <p>Although I have read the answers to this question</p>
  
  <blockquote>
    <p><a href="https://stackoverflow.com/questions/5920527/qt-c-accessing-mainwindow-ui-from-a-different-class">QT/C++ - Accessing MainWindow UI from a different class</a>
     and searched the whole www for quite some time - I don't get it working. </p>
  </blockquote>
  
  <p>I was given the task to recreate an applications UI using QT Designer. Unfortunately there was already some UI spread all over several classes (the team then came across the idea, that using QT but not using the Designer however "handcoding" the UI seems to make little sense)</p>
  
  <p>So now my job is to untangle the open ends, create a GUI (done that) find every possible signal and slot and put it all together to look nice and clean. </p>
  
  <p>So much for the theoretical part.</p>
  
  <p>Addition: I have very little experience in C++ and I seem to be getting nowhere searching for answers and don't have the time to read whole books until tomorrow, otherwise I wouldn't ask.</p>
  
  <p>I am kind of going nuts about two things:</p>
  
  <p>A) My mainwindow.cpp, mainwindow.h and mainwindow.ui need to be linked into other files e.g. the previewwidget.cpp...
  the previewwidget.cpp had a lot of code like:</p>
  
  <pre><code> buttonLayout-&gt;addWidget(fpsSpinBox, 0, Qt::AlignCenter);
   buttonLayout-&gt;addWidget(playButton, 0, Qt::AlignCenter);
   buttonLayout-&gt;addWidget(backwardButton, 0, Qt::AlignCenter);
  </code></pre>
  
  <p>apparently I replaced it by creating the corresponding buttons in Designer.
  now in the same file theres the connect SIGNAL SLOT entries (I added the "ui->")</p>
  
  <pre><code> connect(ui-&gt;playButton, SIGNAL(clicked()), this, SIGNAL(playButtonClicked()));
   connect(ui-&gt;stopButton, SIGNAL(clicked()), this, SIGNAL(stopButtonClicked()));
   connect(ui-&gt;forwardButton, SIGNAL(clicked()), this, SIGNAL(forwardButtonClicked()));
  </code></pre>
  
  <p>but the compiler keeps telling me:</p>
  
  <blockquote>
    <p>\preview\previewwidget.cpp:77: Error:'ui' was not declared in this scope</p>
  </blockquote>
  
  <p>I put the ui_mainwindow.h into the header but that wasn't the solution either.</p>
  
  <hr>
  
  <p><strong>B)</strong> This Question is probably related very closely to the first one: since the Designer strickly keeps model/view/controll apart I need to rewrite the signals and slots to match the new UI - has anyone got a good tutorial or any hints for me how to do this fast and uncomplicated? </p>
  
  <p>Any help would be greatly appreciated.</p>