Q3Grid Class

The Q3Grid widget provides simple geometry management of its children. 更多...

头: #include <Q3Grid>
继承: Q3Frame

公共函数

Q3Grid (int n , QWidget * parent = 0, const char * name = 0, Qt::WindowFlags f = 0)
Q3Grid (int n , Qt::Orientation orient , QWidget * parent = 0, const char * name = 0, Qt::WindowFlags f = 0)
void setSpacing (int space )

重实现公共函数

virtual QSize sizeHint () const

重实现保护函数

virtual void frameChanged ()

额外继承成员

详细描述

The Q3Grid widget provides simple geometry management of its children.

The grid places its widgets either in columns or in rows depending on its orientation.

The number of rows or columns is defined in the constructor. All the grid's children will be placed and sized in accordance with their sizeHint () 和 sizePolicy ().

使用 setMargin () to add space around the grid itself, and setSpacing () to add space between the widgets.

另请参阅 Q3VBox , Q3HBox ,和 QGridLayout .

成员函数文档编制

Q3Grid:: Q3Grid ( int n , QWidget * parent = 0, const char * name = 0, Qt::WindowFlags f = 0)

Constructs a grid widget with parent parent , called name . n specifies the number of columns. The widget flags f 被传递给 Q3Frame 构造函数。

Q3Grid:: Q3Grid ( int n , Qt::Orientation orient , QWidget * parent = 0, const char * name = 0, Qt::WindowFlags f = 0)

Constructs a grid widget with parent parent , called name 。若 orient is Horizontal , n specifies the number of columns. If orient is Vertical , n specifies the number of rows. The widget flags f 被传递给 Q3Frame 构造函数。

[virtual protected] void Q3Grid:: frameChanged ()

重实现自 Q3Frame::frameChanged ().

void Q3Grid:: setSpacing ( int space )

Sets the spacing between the child widgets to space .

[虚拟] QSize Q3Grid:: sizeHint () const

重实现自 QWidget::sizeHint ().