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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -