Different height for table widget's rows and columns
Moved
Solved
Qt for Python
-
Hi, I have a table widget and I want the displayed data to be more close together vertically, what's the best way to do this?
I've tried setting it up in the stylesheet like this, but only the height of the headers changeQHeaderView::section::horizontal { height: 20px; } QHeaderView::section::vertical { height: 10px; }
Here's how it looks like:
-
If anyone finds this, I solved it like this:
def update_table(self, message): row_position = self.table_name.rowCount() self.table_name.insertRow(row_position) # Set the row height for the newly inserted row row_height = 10 # Adjust the height as needed self.table_name.setRowHeight(row_position, row_height)
-
S SGaist moved this topic from General and Desktop on
-
S SGaist has marked this topic as solved on