diff options
Diffstat (limited to 'doc/layout.doc')
-rw-r--r-- | doc/layout.doc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/layout.doc b/doc/layout.doc index 777d3a114..e71c777f0 100644 --- a/doc/layout.doc +++ b/doc/layout.doc @@ -71,7 +71,7 @@ layouts and which generates the C++ layout code for you. \section1 Layout Widgets The easiest way to give your widgets a good layout is to use the -layout widgets: \l QHBox, \l QVBox and \l QGrid. A layout widget +layout widgets: \l QHBox, \l QVBox and \l TQGrid. A layout widget automatically lays out its child widgets in the order they are constructed. To create more complex layouts, you can nest layout widgets inside each other. (Note that \l TQWidget does not have a @@ -87,18 +87,18 @@ inside a \l TQWidget.) \img qvbox-m.png Vertical box with five child widgets -\i A \l QGrid lays out its child widgets in a two dimensional grid. +\i A \l TQGrid lays out its child widgets in a two dimensional grid. You can specify how many columns the grid has, and it is populated left to right, beginning a new row when the previous row is full. The grid is fixed; the child widgets will not flow to other rows as the widget is resized. \endlist - \img qgrid-m.png Two-column grid with five child widgets + \img tqgrid-m.png Two-column grid with five child widgets The grid shown above can be produced by the following code: \code - QGrid *mainGrid = new QGrid( 2 ); // a 2 x n grid + TQGrid *mainGrid = new TQGrid( 2 ); // a 2 x n grid new TQLabel( "One", mainGrid ); new TQLabel( "Two", mainGrid ); new TQLabel( "Three", mainGrid ); @@ -157,7 +157,7 @@ proportion (but never less than their minimum size hint), e.g. If you need more control over the layout, use a \link QLayout QLayout\endlink subclass. The layout classes included in TQt are \link -QGridLayout QGridLayout\endlink and \link QBoxLayout +TQGridLayout TQGridLayout\endlink and \link QBoxLayout QBoxLayout\endlink. (\link QHBoxLayout QHBoxLayout\endlink and \link QVBoxLayout QVBoxLayout\endlink are trivial subclasses of QBoxLayout, that are simpler to use and make the code easier to read.) @@ -174,7 +174,7 @@ improvements: TQWidget *main = new TQWidget; // make a 1x1 grid; it will auto-expand - QGridLayout *grid = new QGridLayout( main, 1, 1 ); + TQGridLayout *grid = new TQGridLayout( main, 1, 1 ); // add the first four widgets with (row, column) addressing grid->addWidget( new TQLabel( "One", main ), 0, 0 ); @@ -253,7 +253,7 @@ TQWidget::heightForWidth(). Even if you implement heightForWidth(), it is still necessary to provide a good sizeHint(). The sizeHint() provides the preferred width of the widget, and it is used by QLayout subclasses that do not -support heightForWidth() (both QGridLayout and QBoxLayout support it). +support heightForWidth() (both TQGridLayout and QBoxLayout support it). For further guidance when implementing these functions, see their implementations in existing TQt classes that have similar layout @@ -406,7 +406,7 @@ It must be implemented. It is used by QLayout::add(), by the QLayout constructor that takes a layout as parent, and it is used to implement the \link QLayout::autoAdd() auto-add\endlink feature. If your layout has advanced placement options that require parameters, you must -provide extra access functions such as \l QGridLayout::addMultiCell(). +provide extra access functions such as \l TQGridLayout::addMultiCell(). \code void CardLayout::addItem( QLayoutItem *item ) |