Вы пытаетесь использовать классы из Qt3 в Qt4. Это можно сделать, т.к. в Qt4 есть модуль Qt3Support, но уже вышла Qt5 в которой этого модуля нет и не будет.
Так что лучше всего переписать примеры на Qt4. Вместо QHBox в Qt4 есть похожий класс QHBoxLayout. QLabel подойдёт для хранения надписи.
QHBox
The QHBox class is now only available as Q3HBox in Qt 4. You can achieve the same result as QHBox by creating a QWidget with an horizontal layout:
For example, if you have code like
QHBox *hbox = new QHBox;
QPushButton *child1 = new QPushButton(hbox);
QPushButton *child2 = new QPushButton(hbox);
you can rewrite it as
QWidget *hbox = new QWidget;
QPushButton *child1 = new QPushButton;
QPushButton *child2 = new QPushButton;
QHBoxLayout *layout = new QHBoxLayout;
layout->addWidget(child1);
layout->addWidget(child2);
hbox->setLayout(layout);
Note that child widgets are not automatically placed into the widget's layout; you will need to manually add each widget to the QHBoxLayout