PDA

View Full Version : Question about QTableWidget.



robgeek
10th April 2015, 19:35
Good afternoon!

How can i set visible by default(even when my table is empty)the column that shows the number of rows(see picture part 2) and how can i set a name for her? That columns only becomes visible when i have data in my table, i don't want that.

11067

Thanks!

ChrisW67
10th April 2015, 22:13
That "Column" is the table's verticalHeader() and shows header values, that may not be related to row numbers at all, for the rows in the table. No rows, no row headers.

If you want a table of empty cells with row headers then set the rowCount to a number greater than zero.

robgeek
13th April 2015, 04:29
Thanks for your answer, but i don't know how set that column width specifically, or how to set a name for it(picture red arrow 2, that empty cell). How can i do this things?

I could shearch, i know, but i don't know even the name( verticalHeader() is just a mathod), thats why i'm posting pictures.

d_stranz
14th April 2015, 03:08
verticalHeader() is just a method

Yes, that's right. And what is the return value of that method? You can start your research with that. For what you'd like to do, you'll probably want to use the horizontalHeader() instead.