QObjectList objList = this->children();
for (int i = 0; i < objList.size(); i++){
const QMetaObject *meta = objList.at(i)->metaObject();
QString className = QString(meta->className());
if (className == "QToolBar"){
QToolBar *toolBar = qobject_cast<QToolBar*> (objList.at(i));
QString str = toolBar->objectName();