Wireshark mailing list archives
Re: Qt - Protocol dissector
From: Gerald Combs <gerald () wireshark org>
Date: Wed, 18 May 2016 09:38:00 +0900
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. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Qt - Protocol dissector Edwin Groothuis (May 16)
- Re: Qt - Protocol dissector Gerald Combs (May 17)
- Re: Qt - Protocol dissector Edwin Groothuis (May 30)
- Re: Qt - Protocol dissector Gerald Combs (May 17)