I'm in the process of a Qt 3 to Qt 4 port and ran into the following issue:
In Qt3 we're sublcassing from QScrollView and overriding the addChild, removeChild and drawContents methods in order to populate the Scroll View with custom widgets. These custom widgets are usually fairly simple consisting of a label and another widget (QLineEdit, QSpinBox, QRadioButtonGroup, etc.) The widgets on the custom widgets are laid out horizontally and then the custom widgets themselves are laid out vertically. It roughly looks something along these lines:

Label1 RadioButton1
Label2 LineEdit2
Label3 RadioButton3
...
etc.

Each pair of widgets above constitutes a custom widget itself

I am looking to preserve the same look and similar ability to call an addChild(QWidget * customWidget) in order to add or remove items to this container. I also need to be able to get back the number of custom widgets in the container and a way to iterate through the widgets.

How would I go about doing this without the Qt3 Support library in Qt4?