First of all, hello to everyone, I'm a newbie hehe.

Just began integration of Qt in our application and I know this is a stupid question but I can't find the solution and I tried. I even got in the source code which was really interesting.

I want to use QGridLayout but limit the number of column. I know it was possible in Qt3 but in Qt4, the constructors have disappeared. It would also be nice to do it after contruction if possible as this may change dynamically.

Also how do I set the default orientation for adding new widget. I looked in the source code and there is setDefaultPositioning but it doesn't seem to do what I want.

For example, I would like to be able to create a QGridLayout. Set max column number to 3 and add every new item in the next column and switch row when necessary using the default addWidget( Widget* ).