diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 4e7f6b3a1..e1ac7c275 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -21,6 +21,14 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), ui->setupUi(this); ui->cylinders->setModel(cylindersModel); ui->weights->setModel(weightModel); + + /* example of where code is more concise than Qt designer */ + QList infoTabWidgets = ui->infoTab->children(); + Q_FOREACH( QObject* obj, infoTabWidgets ){ + QLabel* label = qobject_cast(obj); + if (label) + label->setAlignment(Qt::AlignHCenter); + } } void MainTab::clearEquipment()