c++ - QTableView Expansion -
i have qtableview , wish allow table expansion second column. problem last column expanding.
ui -> tableview -> setmodel(m_model); ui -> tableview ->setcolumnwidth(cmodel::colno, 30); ui -> tableview ->setcolumnwidth(cmodel::colname, 30); ui -> tableview ->setcolumnwidth(cmodel::coln, 30); ui -> tableview ->setcolumnwidth(cmodel::colfx, 30); ui -> tableview ->setcolumnwidth(cmodel::colfy, 30); ui -> tableview ->setcolumnwidth(cmodel::colfxy, 30); ui -> tableview -> header() -> setsectionresizemode(cmodel::colno, qheaderview::fixed); ui -> tableview -> header() -> setsectionresizemode(cmodel::colname, qheaderview::stretch); ui -> tableview -> header() -> setsectionresizemode(cmodel::coln, qheaderview::fixed); ui -> tableview -> header() -> setsectionresizemode(cmodel::colfx, qheaderview::fixed); ui -> tableview -> header() -> setsectionresizemode(cmodel::colfy, qheaderview::fixed); ui -> tableview -> header() -> setsectionresizemode(cmodel::colfxy, qheaderview::fixed);
this resizing both de second , last column:
any opinions?
not sure if code compiles, think shuld be
ui->tableview->horizontalheader()->setsectionresizemode(cmodel::colno, qheaderview::fixed); ...
Comments
Post a Comment