Results 1 to 3 of 3

Thread: How to owner draw the scrollbar in Qt?

  1. #1
    Join Date
    Oct 2009
    Posts
    32
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Question How to owner draw the scrollbar in Qt?

    I want to customize the scrollbar's control in Qt, I want to change the user interface of two pushbuttons and thumb for scrollbar. Can you tell me how to do it?or where I can find the sample code for it? thanks.

  2. #2
    Join Date
    Feb 2006
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to owner draw the scrollbar in Qt?

    First, see if using Qt Style Sheets provides what you want. If not, then another way to achieve what you want is to subclass a QStyle and setting that as the widget's style using QWidget::setStyle().

  3. #3
    Join Date
    Oct 2009
    Posts
    32
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to owner draw the scrollbar in Qt?

    Thank you for your reply. I will try it. I want to know if I subclass the QWindowsStyle then use it in a widget, if it can work correct in linux platform. If I use the scrollbar not embed it in the other widget, which function can decide the thumb size? thanks.
    Last edited by tszzp; 6th November 2009 at 02:15.

Similar Threads

  1. Replies: 6
    Last Post: 21st September 2009, 10:55
  2. Treeview scrollbar not updating when inserting rows
    By Khal Drogo in forum Qt Programming
    Replies: 11
    Last Post: 29th November 2007, 13:13
  3. GraphicsView/GraphicsScene: scrollbar policy Qt::ScrollBarAsNeeded
    By Pieter from Belgium in forum Qt Programming
    Replies: 4
    Last Post: 21st March 2007, 13:15
  4. about scrollbar style
    By qtopiahooo in forum Qt Programming
    Replies: 1
    Last Post: 25th January 2007, 13:34
  5. Using QGLWidget paint engine to draw regular widgtes?
    By high_flyer in forum Qt Programming
    Replies: 11
    Last Post: 9th October 2006, 12:06

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.