View Full Version : centralWidget always in center

28th September 2009, 13:35
Can somebody tell me how I can position the centralwidget in the center of the mainwindow. I have a QTextEdit as a centralWidget and I want it always to be in the middle of the window.

29th September 2009, 00:12
You probably forgot to apply a layout to your central widget (which is probably the parent of the text edit).

29th September 2009, 15:49
Can you tell me how many layout objects I need, since I want the central widget(size of a A4 or Letter) always to be placed in the center of the main window and thus nothing on the left or right. Should I add a layout to the central widget and then three other widgets (left, middle, right) with three seperate layouts coupled to them? or is one central widget layout enough.

29th September 2009, 16:13
Can you tell me how many layout objects I need
Just one...