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: enter image description here

any opinions?

not sure if code compiles, think shuld be

ui->tableview->horizontalheader()->setsectionresizemode(cmodel::colno, qheaderview::fixed); ... 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -