Results 1 to 2 of 2

Thread: about scrollbar style

  1. #1
    Join Date
    Oct 2006
    Qt products

    Default about scrollbar style


    according to my understanding, because there is no such setScrollbar functions
    in the scrollview class, we can't create a new scrollbar class and set it. if different styles of scrollbar are needed in the scrollview and its subclasses, new QStyle subclasses must be created and the corresponding funtions about scrollbar must be implemented. then we can use QWidget::setStyle function to set the scrollbar style.

    if every scrollview subclass has a different style of scrollbar, the same count of kinds of style classes must be implemented.

    am i right? i am not sure if it is right. if so, it is very troublesome to change the style of scrollbar.

    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Warsaw, Poland
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits

    Default Re: about scrollbar style

    You can try to substitute the scrollbar if you subclass the scrollview, but you'll have to look into the sources because you'd have to reconnect all the signals, etc. I think you'll achieve your goal faster by implementing a style proxy.

Similar Threads

  1. GraphicsView/GraphicsScene: scrollbar policy Qt::ScrollBarAsNeeded
    By Pieter from Belgium in forum Qt Programming
    Replies: 4
    Last Post: 21st March 2007, 13:15
  2. Custom Style
    By Dusdan in forum Qt Tools
    Replies: 8
    Last Post: 1st September 2006, 22:50
  3. QTreeWidget + ScrollBar
    By raphaelf in forum Qt Tools
    Replies: 12
    Last Post: 1st June 2006, 20:53
  4. QTableView number of rows and scrollbar issue
    By jnk5y in forum Qt Programming
    Replies: 3
    Last Post: 1st March 2006, 06:55
  5. Bugs, style changes in 4.1.0?
    By simk in forum Qt Programming
    Replies: 13
    Last Post: 13th February 2006, 11:05


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.