PDA

View Full Version : How to make splitter fill the window?



marc2050
24th April 2011, 14:29
Hi.

I created a mainwindow.
I then create a splitter.
and then I added 2 different QTextEdit to the splitter.
Compile and show the window.

All is fine except that the window showed 2 textedit that are filling just a small part of the screen.
1. How do I make the splitter (with the 2 textedit in the splitter) to fill up the whole mainwindow?
2. How do I make the splitter also to resize when I resize my mainwindow?

Thank you.
marc

Zlatomir
24th April 2011, 14:34
Use setCentralWidget(...) (http://doc.qt.nokia.com/latest/qmainwindow.html#setCentralWidget) to put a widget into a QMainWindow.