Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. // m_widget->dumpObjectInfo();
  2. // m_widget->dumpObjectTree();
  3. QList <QWidget *> objDmp = m_widget->findChildren<QWidget *>();
  4. foreach (QWidget * w, objDmp)
  5. {
  6. qDebug() << w->objectName() << w->metaObject()->className();//w->staticMetaObject.className();
  7. }
  8.  
  9. // List all the form elements that the user might be interacting with
  10. QList <QPushButton *> buttons = m_widget->findChildren<QPushButton*>();
  11. foreach(QPushButton * b, buttons)
  12. qDebug() << b->objectName() << b->isVisible() << b->isEnabled() << b->text();
  13.  
  14. QList <QLineEdit *> lineEdits = m_widget->findChildren<QLineEdit*>();
  15. foreach(QLineEdit * le, lineEdits)
  16. qDebug() << le->objectName() << le->isVisible() << le->isEnabled() << le->text();
  17.  
  18. QList <QComboBox *> comboBoxes = m_widget->findChildren<QComboBox*>();
  19. foreach(QComboBox * cb, comboBoxes)
  20. qDebug() << cb->objectName() << cb->isVisible() << cb->isEnabled() << cb->currentText();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement