pyqt4 already has a layout. How to 'detect' it or change?
<p>I'm trying to set a layout manager. But getting the message:</p>

<pre><code>QLayout: Attempting to add QLayout "" to Window "", which already has a layout
</code></pre>

<p>How can I change or detect which type the layout is? I'd like to use the boxlayout as it seems to be prefered.</p>

<pre><code>import sys
from PyQt4 import QtGui as qt

class Window(qt.QMainWindow):

    def __init__(self):
        super(Window, self).__init__()
        #Lav widgets
        self.CreateWidgets()       

    def CreateWidgets(self):
        btn = qt.QPushButton("Fetch", self)
        btn.clicked.connect(self.GetData)

        self.layout = qt.QVBoxLayout(self)

        self.setGeometry(560, 240, 800, 600)
        self.setWindowTitle("We do not sow")
        self.show()

    def GetData(self):
        print("Hello World!")

app = qt.QApplication(sys.argv)
w = Window()
sys.exit(app.exec_())
</code></pre>