PDA

View Full Version : Child Windows



s_a_white
11th July 2006, 18:29
Ideally am after a QMainWindow that I can grid. I'm wanting to do this to create fixed layouts with limited move, resize abilites (something like grid layout widget in designer when placing or moving existing widgets) whilst preventing windows overlapping. I'd like to hook onto the resize events so I can to the appropriate thing (re-grid differently). I'd like to use something QT inbuilt so it automatically looks correct on other platforms (whereas a customly created widget wouldn't).

Any ideas, all thoughts appreciated? I've been looking along the lines of the following:

I've tried QWidget with Qt::Window and Qt::SubWindow but that dosen't do the right thing when gridded.

I've tried QWorkspace and although now I can get child windows I haven't yet found a way to restrict their resizing/positioning behaviour.

Lastly I've tried QDockWidget. This is probably the most promising but has limitations in that it can only be in specific areas of a QMainWindow. I'd like to dock only certain windows in a frame, only those that have frame as parent. Perhaps a single qworkspace with empty qmainwindow would do this? Atleast with this the method objects cannot overlap. If only there is away to specify the initial layout (i.e. this next to this, this one below those two spanning both..... like can do in a grid layout).

wysota
16th July 2006, 00:20
Maybe this is a stupid question, but why don't you use QGridLayout?