Python QT. Form from another Form
<p>First i am beginning in programming :)</p>

<p>I create in QT Designer Form ( MainForm) and add function  in button to open a new form. I do this step from 
<a href="http://stackoverflow.com/questions/27567208/how-do-i-open-sub-window-after-i-click-on-button-on-main-screen-in-pyqt4">How do I open sub window after I click on button on main screen in PyQt4</a> ( First anwser) but when i compile I got:</p>

<blockquote>
  <p>'Ui_V1' object has no attribute 'show'</p>
</blockquote>

<p>Where is the problem.
thanks :)</p>

<p>this is a part of code in main form.py:</p>

<pre><code>from V1 import Ui_V1
#V1 class and form
self.pushButton_5.clicked.connect(lambda: self.openV1())
def openV1(self):
    window=Ui_V1()
    window.show()
</code></pre>

<p>OK i solved this by watching video on Yt :D</p>

<pre><code>def openV1(self):
    self.V1Window=QtGui.QMainWindow()
    self.ui= Ui_V1()
    self.ui.setupUi(self.V1Window)
    self.V1Window.show()
</code></pre>

<p>and it works :)</p>

<p>Have you compiled your code to python? By default it will be a ui file. You can use <code>pyuic4.exe</code> file.</p>

<pre><code>c:\Python27\Lib\site-packages\PyQt4\something&gt; pyuic4.exe full/path/to/input.ui -o full/path/to/output.py
</code></pre>

python qt pyqt