Wireshark 4.7.4
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
PinnedColumnHeader Class Reference

The header used by PinnedColumnView. More...

#include <pinned_column_header.h>

Inheritance diagram for PinnedColumnHeader:

Public Member Functions

 PinnedColumnHeader (PacketList *packet_list, QWidget *parent=nullptr)

Protected Member Functions

void mousePressEvent (QMouseEvent *event) override
void mouseMoveEvent (QMouseEvent *event) override
void mouseReleaseEvent (QMouseEvent *event) override
void contextMenuEvent (QContextMenuEvent *event) override

Detailed Description

The header used by PinnedColumnView.

QHeaderView handles interactive resize (and its own click-to-sort detection) directly in its mousePress/Move/ReleaseEvent virtuals rather than through events that reliably pass through an installed event filter (an installEventFilter()-based approach was tried and found not to see any mouse press/release events at all, even though resize itself worked). Overriding those virtuals directly guarantees they're seen, so a plain click (no drag) can be forwarded to the primary view's header to trigger sorting, matching a click on the real header exactly.

Constructor & Destructor Documentation

◆ PinnedColumnHeader()

PinnedColumnHeader::PinnedColumnHeader ( PacketList * packet_list,
QWidget * parent = nullptr )
explicit
Parameters
packet_listThe primary view mouse/context-menu events on this header are forwarded to; must outlive this header.
parentThe view this header is installed on via setHeader().

The documentation for this class was generated from the following files: