PDA

View Full Version : centralWidget always in center



xyfix
28th September 2009, 14: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.

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

xyfix
29th September 2009, 16: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.

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