Okay first off if you do this:
Next you want to display it like a Window then you need to use one as follows:
from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import *You do not need this:
from PyQt5 import QtWidgets from PyQt5 import QtCore from PyQt5 import QtGuiAnd the latter does not work well (if at all) within pyqt5
Next you want to display it like a Window then you need to use one as follows:
class Window(QMainWindow): def __init__(self, DatabaseFile, parent=None): super(Window, self).__init__(parent) self.setCentralWidget(CenterPane(self)) class CenterPane(QWidget): def __init__(self, parent): QWidget.__init__(self) self.Panel1 = CreatePanel1() self.Panel2 = CreatePanel2() CenterPane = QSplitter(Qt.Horizontal, self) CenterPane.addWidget(self.Panel1) CenterPane.addWidget(self.Panel2) CenterPane.setSizes([100,200]) hbox = QHBoxLayout(self) hbox.addWidget(CenterPane) self.setLayout(hbox)Note: I am fairly new to pyqt5 so there might be a better way to implement the above but so far this has worked for me and perhaps you can glean something form it that will help you. Also the above is an extremely small snippet just to show you how to layout the center pane of a window as I found that a bit of an issue initially myself