changing height of Qtablewidget Cells
-
wrote on 14 Jul 2023, 16:15 last edited by
I want to change the height of cells of the Qtablewidget i have change the height of column successfully but i am unable to do the same for all the cells below or rows you may call.
changed height of column via :
Qtablewidget *table = new Qtablewidget; horizontalHeader()->setFixedHeight(30);
Tried to do this did not work :
verticalHeader()->setFixedHeight(30)
-
I want to change the height of cells of the Qtablewidget i have change the height of column successfully but i am unable to do the same for all the cells below or rows you may call.
changed height of column via :
Qtablewidget *table = new Qtablewidget; horizontalHeader()->setFixedHeight(30);
Tried to do this did not work :
verticalHeader()->setFixedHeight(30)
wrote on 14 Jul 2023, 16:52 last edited by@Narutoblaze
Have a try with:
setMinimumSectionSize() or
setDefaultSectionSize() -
@Narutoblaze
Have a try with:
setMinimumSectionSize() or
setDefaultSectionSize()wrote on 14 Jul 2023, 17:05 last edited by@mpergand this worked partially when set large numbers but not when i wanted to make it extremely thinner.
worked :
setDefaultSectionSize(50);
Did not worked :
setDefaultSectionSize(30);
Did not worked :
setDefaultSectionSize(10);
setting to small numbers like above did not change the height of the cells so i believe this is not a good solution and is error prone and also does not solve my problems.
why setting height does not work is it a bug ?
-
@mpergand this worked partially when set large numbers but not when i wanted to make it extremely thinner.
worked :
setDefaultSectionSize(50);
Did not worked :
setDefaultSectionSize(30);
Did not worked :
setDefaultSectionSize(10);
setting to small numbers like above did not change the height of the cells so i believe this is not a good solution and is error prone and also does not solve my problems.
why setting height does not work is it a bug ?
wrote on 14 Jul 2023, 18:47 last edited by@Narutoblaze
add:
sectionResizeMode(QHeaderView::Fixed); -
@Narutoblaze
add:
sectionResizeMode(QHeaderView::Fixed);wrote on 15 Jul 2023, 14:42 last edited by
3/5