Project

General

Profile

Tooltip on HeaderData??

Added by Mark Travis over 1 year ago

I'd like to set a tooltip on a column of data in WStandardItemModel. It seems I can set a tooltip on each data element in the column, but not the header itself.

Is there a way to do WStandardItemModel->HeaderData(colnum)->setToolTip("some tip");

I know this isn't possible because the above statement is treated as a std::any, so I'm not addressing the right place to store the tooltip.


Replies (1)

RE: Tooltip on HeaderData?? - Added by Roel Standaert over 1 year ago

The ToolTip ItemDataRole works:

model->setHeaderData(colnum, Wt::Orientation::Horizontal, "some tip", Wt::ItemDataRole::ToolTip);
    (1-1/1)