From eb7e70b941268e1e6931c9618462ccbba8442e1c Mon Sep 17 00:00:00 2001 From: _xeroxz Date: Fri, 4 Jun 2021 13:34:10 -0700 Subject: [PATCH] fixed that qt tree widget child issue... now when you click a child item it displays its info...: --- src/qvminspector.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qvminspector.cpp b/src/qvminspector.cpp index dafcb9b..85d9228 100644 --- a/src/qvminspector.cpp +++ b/src/qvminspector.cpp @@ -197,6 +197,10 @@ void qvminspector_t::add_branch_children( qtree_widget_item_t *item, std::uintpt 1 /* zero based vreg... */ : 0u ) ); + QVariant var; + var.setValue( virt_instr ); + virt_instr_entry->setData( 3, Qt::UserRole, var ); + if ( virt_instr->mnemonic_t == vm::handler::JMP && code_block->jcc.has_jcc ) { virt_instr_entry->setText( @@ -240,7 +244,6 @@ void qvminspector_t::add_branch_children( qtree_widget_item_t *item, std::uintpt item->addChild( virt_instr_entry ); add_branch_children( item, code_block->jcc.block_addr[ 0 ] ); } - item->addChild( virt_instr_entry ); } }