How to know which row of the QTableWidget has the focus
-
The vertical header is displayed by default. You can tweak it manually like this:
@
ui->tableWidget->horizontalHeader()->hide();
ui->tableWidget->verticalHeader()->show();
@If you do not provide other data, it is enumerated automatically, starting with 1, like in this screenshot of the Docs:
!/doc/qt-4.7/images/qtableview-resized.png!
-
You are confusing the matter again. Are you using QTableView or QTableWidget?
QTableWidget gives you accessor method to get the items representing the headers (if you set them, I'd think), while if you are using QTableView, you can use the model to find out the header contents as well. If you do just a little bit of searching in the documentation on a relevant term like "header" you will find them in no time flat.
I am wondering though: what is your goal? Why do you need to store the contents of the headers in some variables? It doesn't seem to make too much sense.