[Interest] Designer - grid layout

Tony Rietwyk tony at rightsoft.com.au
Fri Feb 1 06:39:22 CET 2013


Hi Phil, 

Several ways of doing this in Qt 4: 

1)

- Remove any layout in the container if present
- Place the 9 edit boxes, roughly in line with each other
- Apply the grid layout

2)

- Remove any layout in the container if present
- Add first edit box
- Apply the grid layout
- Add the other two edits for a row or column
- Drag another edit box, a blue line should appear to add another row or
column
- Release the drag, the grid should create the extra row or column, with the
edit box only occupying one cell
- Drag in the other edit boxes, a red rectangle should appear in the
unoccupied cells. 
- Repeat for the third row or column. 

Hope that helps, 

Tony


> Sent: Friday, 1 February 2013 3:47 PM
> 
> Thank you for reading this.
> 
> I'm trying to create a 3 x 3 grid of edit boxes and it seems that Designer
will
> only allow me to create either a horizontal line or a vertical line of
boxes.
> 
> I was expecting to to able to set grid layout's property to 3 x 3 but that
> doesn't seem possible. The Qt manual includes an example of a grid layout
> but not how to have Designer create a 3 x 3 grid of widgets, for example.
> 
> A Google search didn't turn up anything helpful.
> 
> --
> Regards,
> Phil





More information about the Interest mailing list