title: pyqt - position child widget from qt designer near parent
body: <p>I use <code>Qt Designer</code> to create a child widget (layout) - <code>tree_view_widget_ui.py</code></p>
  
  <pre><code>class Ui_Form(object):
      def setupUi(self, Form, parent = None):
          Form.setObjectName(_fromUtf8("Form"))
          Form.setEnabled(True)
          Form.resize(200, 300)
          Form.setMinimumSize(QtCore.QSize(200, 300))
          self.gridLayout = QtGui.QGridLayout(Form)
          self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
          self.treeWidget = QtGui.QTreeWidget(Form)
          self.treeWidget.setEnabled(True)
          self.treeWidget.setMinimumSize(QtCore.QSize(200, 300))
          font = QtGui.QFont()
          self.treeWidget.setFont(font)
          self.treeWidget.setDragDropMode(QtGui.QAbstractItemView.DragDrop)
          self.treeWidget.setObjectName(_fromUtf8("treeWidget"))
          self.treeWidget.headerItem().setText(0, _fromUtf8("1"))
          self.gridLayout.addWidget(self.treeWidget, 0, 0, 1, 1)
  
          self.retranslateUi(Form)
          QtCore.QMetaObject.connectSlotsByName(Form)
  
      def retranslateUi(self, Form):
          Form.setWindowTitle(_translate("Form", "Tree View", None))
          self.treeWidget.setSortingEnabled(True)
  </code></pre>
  
  <p>and I initialize child user-interface in <code>tree_view_widget.py</code></p>
  
  <pre><code>from tree_view_widget_ui import Ui_Form
  
  class TreeViewWidget(QWidget):
     def __init__(self, parent=None, flags=0):
         super(TreeViewWidget, self).__init__(parent)
         self.ui = Ui_Form()
         self.ui.setupUi(self, parent = parent)
  </code></pre>
  
  <p>And the child widget is intialized from parent <code>main.py</code> and opened with signal:</p>
  
  <pre><code>#    tree widget
  from tree_view_widget.tree_view_widget import TreeViewWidget 
  
  class MainWindow(QtGui.QMainWindow):
      def __init__(self):
          super(MainWindow, self).__init__()
          self.flags = QtCore.Qt.Window
          #    tree view widget
          self.TreeViewWidget = TreeViewWidget(parent=self)
          self.TreeViewWidget.setWindowFlags(self.flags)
          self.TreeViewWidget.show()
  </code></pre>
  
  <p><strong>My question is:</strong> How can I position the child widget near parent widget that top left/right corners will coincide and not modifying file <code>tree_view_widget_ui.py</code> as this code is automatically generated from <code>Qt Designer</code>. I managed to position child widget to target location but only when modifying file <code>tree_view_widget_ui.py</code> but I would like to avoid that if possible.</p>