Here is a full , debug, output.
My task is to gain access to one of the highlighted “children”.
I have access to “this” pointer and I believe I SHOULD iterate thru “parent” objects to accomplish my task.
I know how to code / use “foreach” to loop thru ONE “parent” (pointer), I do need help with
C++ coding “foreach” to loop thru ALL “parent” objects in “this” tree.
Locals
index 1 int
mainWindow 0x0 MainWindow_Bluetooth*
test ” TEST SettingsDialog Constructor (emit index 1 ) ” QString
this “SettingsDialog” SettingsDialog
[QDialog] “SettingsDialog” QDialog
[d] @0x555555d8ab80 QDialogPrivate
[parent] @0x555555dda550 QMdiSubWindow
[QWidget] @0x555555dda550 QWidget
[d] @0x555555d7b9d0 QMdiSubWindowPrivate
[parent] @0x555555c2c790 QWidget
[QObject] @0x555555c2c790 QObject
[QPaintDevice] @0x555555c2c7a0 QPaintDevice
[d] @0x555555c2c7d0 QWidgetPrivate
[parent] @0x555555c5ec90 QMdiArea
[QAbstractScrollArea] @0x555555c5ec90 QAbstractScrollArea
[d] @0x5555558c04f0 QMdiAreaPrivate
[parent] “MainWindow_Bluetooth” MainWindow_Bluetooth
[QMainWindow] “MainWindow_Bluetooth” QMainWindow
[d] @0x555555c2a630 QMainWindowPrivate
[parent] @0x555555ce30c0 QMdiSubWindow
[children] <35 items> QList<QObject>
[properties] <at least 0 items>
[methods] <20 items>
[extra]
Menu_Index 0 int
command 0x0 char
index 8 int
index_sub 0 int
list_array @0x555555bcda90 QStringList[10]
m_TAB_CommonDebug “A_BT_TAB_DIALOG” A_BT_TAB_DIALOG
m_TAB_Connect 0x0 A_BT_TAB_DIALOG
m_TAB_Ext 0x0 A_BT_TAB_DIALOG_EXT
m_console @0x555555c2ce00 Console
m_mdiarea @0x555555c5ec90 QMdiArea
m_serial @0x55555566b480 QSerialPort
m_settings “SettingsDialog” SettingsDialog
m_settings_RFcomm 0x0 SettingsDialog_RFcomm*
m_status @0x555555c5edb0 QLabel
m_ui @0x555555669da0 Ui::MainWindow_Bluetooth
mainAction @0x555555bcdbe8 QAction*[16]
result “” QString
subAction @0x555555bcdae8 QAction*[16]
subMenu @0x555555bcdb68 QMenu*[16]
text ” Parent console (case 7) ” QString
verify @0x555555bcdc90 QStringList[16]
[children] <3 items> QList<QObject*>
[properties] <at least 8 items>
[methods] <14 items>
[extra]
[children] <6 items> QList<QObject*>
[properties] <at least 59 items>
[methods] <27 items>
[extra]
data @0x555555c2c8f0 QWidgetData
[children] <4 items> QList<QObject*>
[properties] <at least 2 items>
[methods] <7 items>
[extra]
[children] <8 items> QList<QObject*>
[properties] <at least 0 items>
[methods] <8 items>
[extra]
ConnectIndex 1 int
ConnectText ” TEST SettingsDialog Constructor (emit index 1 ) ” QString
m_TAB_CommonDebug 0x0 A_BT_TAB_DIALOG*
m_TAB_Connect “A_BT_TAB_DIALOG” A_BT_TAB_DIALOG
m_TAB_Ext “A_BT_TAB_DIALOG_EXT” A_BT_TAB_DIALOG_EXT
m_currentSettings @0x555555d63cd0 SettingsDialog::Settings
m_intValidator @0x555555dbe390 QIntValidator
m_status @0x555555dbdcc0 QLabel
m_ui @0x555555d751b0 Ui::SettingsDialog
pTAB “A_BT_TAB_DIALOG” A_BT_TAB_DIALOG
staticMetaObject @0x7ffff7f03620 QMetaObject
statusBar @0x555555dcf6a0 QStatusBar
text “nt #ifdef APPLY_CONNECT ntTRACE SettingsDialog::processAction(int index) … int SettingsDialog::processAction(int, QString)403 nindex 1t Test message n TEST SettingsDialog Constructor (emit index 1 ) ” QString
Inspector
Expressions
“(?<=thci0
// subMenu[index] = subMenu[index]
// ->addMenu(list[index] +
SERIAL_SETUP
SetupRun
endif
// //subtempmenu = new QMenu();
//
m_ui->actionConnect
processAction
qDebug().noquote() << text;
Return Value
Tooltip
As I said, I know how to do “foreach” in single “parent”.
Perhaps I need nested “foreach” loops?
If so – how ?
PS
I am not a robot and I’ll not respond to AI generated comments.