python - QTableView column control to facilitate show/hide columns -
the java jxtable has column control let users show/hide columns.
does qtableview have similar? know there's an api call show/hide column, doesn't when using program qtableview.
use horizontal header table , call hide section passing index want hide, link signal context menu gets index of column right clicked
table_view->horizontalheader()->hidesection(index);
edit: , similary show columns
table_view->horizontalheader()->showsection(index);
get index qpoint (which point of context menu requested from)
int index = table_view->horizontalheader()->logicalindexat(cursor_pos);
Comments
Post a Comment