Adjust the height of a cell in QTableWidget using stylesheets
-
Hi,
I have several QtableWidgets in my application, and I noticed the height of the cells in the tables are a little larger than I would like. I prefer to change the height using a stylesheet rather than programmatically adjust the height for each table in code. I checked the stylesheet documentation but couldn't seem to find an answer but perhaps I missed something.
Is it possible to do this using a stylesheet?
Thanks!
-
@leinad said in Adjust the height of a cell in QTableWidget using stylesheets:
I checked the stylesheet documentation but couldn't seem to find an answer but perhaps I missed something.
I believe that is because you cannot change row heights from QSS.
-
table_wdiget->verticalHeader()->setDefaultSectionSize( item_height );
use vertical header view stylesheet. However, I did not see item height setting
https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qheaderview