Results 1 to 5 of 5

Thread: To Reduce the hieght of slider in QScrollBar and hieght of header in QTreeWidget.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Posts
    326
    Qt products
    Qt4
    Platforms
    MacOS X
    Thanks
    42
    Thanked 1 Time in 1 Post

    Default To Reduce the hieght of slider in QScrollBar and hieght of header in QTreeWidget.

    Hi

    Working on Qt4.3 on my mac os machine,

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

    Qt Code:
    1. treeWidget->header()->setFixedHeight(15);
    To copy to clipboard, switch view to plain text mode 

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

    Qt Code:
    1. treeWidget->horizontalScrollBar()->setFixedHeight(5);
    To copy to clipboard, switch view to plain text mode 

    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?
    Attached Images Attached Images
    Always Believe in Urself
    Merry

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Wiki edits
    15

    Default Re: To Reduce the hieght of slider in QScrollBar and hieght of header in QTreeWidget.

    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.

  3. #3
    Join Date
    Jan 2007
    Posts
    326
    Qt products
    Qt4
    Platforms
    MacOS X
    Thanks
    42
    Thanked 1 Time in 1 Post

    Default Re: To Reduce the hieght of slider in QScrollBar and hieght of header in QTreeWidget.

    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.
    Always Believe in Urself
    Merry

  4. #4
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Wiki edits
    15

    Default Re: To Reduce the hieght of slider in QScrollBar and hieght of header in QTreeWidget.

    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

  5. #5
    Join Date
    Jan 2007
    Posts
    326
    Qt products
    Qt4
    Platforms
    MacOS X
    Thanks
    42
    Thanked 1 Time in 1 Post

    Default Re: To Reduce the hieght of slider in QScrollBar and hieght of header in QTreeWidget.

    My problem is solved by using QStyle.
    Always Believe in Urself
    Merry

Similar Threads

  1. Resize Row Hieght in QTreeWidget
    By photo_tom in forum Qt Programming
    Replies: 0
    Last Post: 24th May 2010, 16:42
  2. Hide a slider on a QScrollBar
    By paolom in forum Qt Programming
    Replies: 8
    Last Post: 6th October 2009, 10:07
  3. how to hide slider bar on the QScrollBar
    By yxmaomao in forum Qt Programming
    Replies: 7
    Last Post: 30th May 2008, 10:02
  4. Custom (pixmap) slider handle for QScrollBar
    By Antrax in forum Qt Programming
    Replies: 1
    Last Post: 17th October 2006, 12:04
  5. QScrollBar: custom slider's size ?
    By deweyjew in forum Qt Programming
    Replies: 1
    Last Post: 9th May 2006, 10:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.