PDA

View Full Version : To Reduce the hieght of slider in QScrollBar and hieght of header in QTreeWidget.



merry
23rd May 2011, 10:03
Hi

Working on Qt4.3 on my mac os machine,

I am trying to reduce the height of QTreeWidget Header using this function :


treeWidget->header()->setFixedHeight(15);

and hieght of slider in QScrollBar used in QTreeWidget using this function:


treeWidget->horizontalScrollBar()->setFixedHeight(5);

using this scrollArea is reduced not the size of the slider inside it.

But it wont give the perfect results, Attachments are for reference.

Can anybody pls suggest what to do?

Santosh Reddy
23rd May 2011, 17:51
I don't think you can set slider size, you may be able to set QScrollBar size (i guess that is waht you have done). Slider's size is supposed to be calculated based on widget actual size vs. the widget's displayed size, the ratio of these will the size of the slider.

and I don;t see any problem with header size, it look ok.

merry
24th May 2011, 05:13
Thanks for the reply, but when i try to change the scrollbar size then the size of the slider not changed, if i make scrollbar thinner, then the slider height not reduced, but scrollbar overlaps slider.

There is no property to make slider thinner inside scroll bar.

Santosh Reddy
24th May 2011, 12:01
I think I did not understand your problem properly, please ignore my reply....

As far as I know, I don't know if it is possible to adjust the height of the scrollbar, please wait some one else to reply

merry
25th May 2011, 05:27
My problem is solved by using QStyle.