aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/maintab.cpp8
1 files changed, 8 insertions, 0 deletions
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<QObject *> infoTabWidgets = ui->infoTab->children();
+ Q_FOREACH( QObject* obj, infoTabWidgets ){
+ QLabel* label = qobject_cast<QLabel *>(obj);
+ if (label)
+ label->setAlignment(Qt::AlignHCenter);
+ }
}
void MainTab::clearEquipment()