On 5/17/16 7:18 AM, Edwin Groothuis wrote:
>> I hope that somebody can give me a quick pointer:
>> In ui/qt/proto_tree.cpp in the ProtoTree class, how can I get access to the
>> current selected protocol? In the below example, TCP.
>> 
>> I’ve stared at various files for a long time but it doesn’t click... Who
>> can help?

> Each protocol tree item has a field_info pointer associated to it via 
> QTreeWidgetItem::setData(0, Qt::UserRole). You can fetch the pointer using 
> QTreeWidgetItem::data. See ProtoTree::contextMenuEvent and 
> ProtoTree::updateSelectionStatus for examples.

Believe it or not, but I managed to get the data via the functions suggested. 
Thanks!

Edwin
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to