1

When I hold the right border of column in QTableView and try to change it`s size, all works fine except one thing: there is a minimal size of column, something about 20 pixels. But I need a possibility to collapse this column to zero size, if I wish so.

What should I do?

Vikash Pandey
  • 5,407
  • 6
  • 41
  • 42
remaL
  • 21
  • 1

1 Answers1

2

You can try method setMinimumSectionSize(int size) of QHeaderView (Qt documentation: http://doc.qt.io/qt-5/qheaderview.html#minimumSectionSize-prop).

For example:

YourTableView->horizontalHeader()->setMinimumSectionSize(0);
Kirill Chernikov
  • 1,387
  • 8
  • 21