title: Qt Using a Ui file and QUiLoader
body: <p>I am developing an c++ application using Qt. I want to use the Qt Designer ui file in my code as it is (in XML) not compiling the code and hard coding it. I am using the example code from this URL.</p>
  
  <p><a href="http://doc.qt.digia.com/4.7/uitools-textfinder.html" rel="nofollow">link to example code</a></p>
  
  <p>The example applies the XML to a QWidget and then displays the QWidget. How can this be implemented using QMainWindow, keeping in mind that I selected the Main Window form in Qt Designer which already adds a central widget?</p>