|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# Qt 3 Support Members for QSplitter

The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.

- QSplitter class reference

### Public Types

- enum ResizeMode { Auto, Stretch, KeepSize, FollowSizeHint }

### Public Functions

- QSplitter ( QWidget * parent, const char * name )
- QSplitter ( Qt::Orientation orientation, QWidget * parent, const char * name )
- void moveToFirst ( QWidget * widget )
- void moveToLast ( QWidget * widget )
- void setCollapsible ( QWidget * widget, bool collapsible )
- void setResizeMode ( QWidget * widget, ResizeMode mode )

- 60 public functions inherited from QWidget
- 8 public functions inherited from QObject
- 8 public functions inherited from QPaintDevice

## Member Type Documentation

### enum QSplitter::ResizeMode

This enum describes the different resizing behaviors child widgets can have:

Constant | Value | Description
--- | --- | ---
`QSplitter::Auto` | `3` | The widget will be resized according to the stretch factors set in its sizePolicy().
`QSplitter::Stretch` | `0` | The widget will be resized when the splitter itself is resized.
`QSplitter::KeepSize` | `1` | QSplitter will try to keep the widget's size unchanged.
`QSplitter::FollowSizeHint` | `2` | QSplitter will resize the widget when the widget's size hint changes.

Use setStretchFactor() instead.

## Member Function Documentation

### QSplitter::QSplitter ( QWidget * parent, const char * name )

Use one of the constructors that doesn't take the name argument and then use setObjectName() instead.

### QSplitter::QSplitter ( Qt::Orientation orientation, QWidget * parent, const char * name )

Use one of the constructors that don't take the name argument and then use setObjectName() instead.

### void QSplitter::moveToFirst ( QWidget * widget )

Use insertWidget(0, widget) instead.

### void QSplitter::moveToLast ( QWidget * widget )

Use addWidget(widget) instead.

### void QSplitter::setCollapsible ( QWidget * widget, bool collapsible )

This is an overloaded member function, provided for convenience.

Use setCollapsible(indexOf(widget, collapsible)) instead.

### void QSplitter::setResizeMode ( QWidget * widget, ResizeMode mode )

Use setStretchFactor() instead.

For example, if you have code like

        splitter->setResizeMode(firstChild, QSplitter::KeepSize);
        splitter->setResizeMode(secondChild, QSplitter::Stretch);

you can rewrite it as

        splitter->setStretchFactor(firstChild, 0);
        splitter->setStretchFactor(secondChild, 1);