Wrong layout in QMainWindow?
问题 I am getting wrong layout in PyQT5. What am I doing wrong? Is there some predefined small field size or similar? I created main window as QMainWindow and inside it a widget as central widget. This is how it looks like: class Main(QWidget): """The main widget with label and LineEdit""" def __init__(self, parent=None): super().__init__(parent) self.initUi() def initUi(self): """Initialize the UI of the main widget""" self.mySourceLabel = QLabel("Select your file:") self.mySourceLine = QLineEdit