How do I iterate across the columns of a QTableView so I can find the total width of the table?
-
Hi,
I need to find the total width of a QTableView and size() is not giving me that so I thought I would add the width of each column.... but where are the columns of a QTableView?? There are no ColumnCount() method....
How do I find the number of columns in the tableview? -
@jdent said in How do I iterate across the columns of a QTableView so I can find the total width of the table?:
@Axel-Spoerl How can I get the vertical scrollbar of the QTableView?
Simply with verticalScrollBar()
cause QTableView inherits of QAbstractScrollArea ;) -
-
@jdent
int size()
returns the actual size.
int sizeHint()
is probably what you want. It returns how wide the header view wants to be in ideal circumstances.
int sectionSizeHint(int section)
returns the size hint for a given section. -
@Axel-Spoerl How can I get the vertical scrollbar of the QTableView?
-
@jdent said in How do I iterate across the columns of a QTableView so I can find the total width of the table?:
@Axel-Spoerl How can I get the vertical scrollbar of the QTableView?
Simply with verticalScrollBar()
cause QTableView inherits of QAbstractScrollArea ;) -