Results 1 to 2 of 2

Thread: Widgets Part of the QScrollBar

  1. #1
    Join Date
    Jul 2010
    Location
    United States
    Posts
    13
    Thanks
    4
    Qt products
    Platforms
    Unix/X11 Windows

    Default Widgets Part of the QScrollBar

    I was curious if there was a way to access the various widgets which make up the QScrollBar. For instance you have the scroll arrows, the slider and the page control area where the slider is dragged across. I wanted to know if there was a way to access these various widgets directly. I have poured through the online help and unless I am blind, I just don't see how. Thanks for any help.

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Widgets Part of the QScrollBar

    You can have a look at the widget's source code. What goes on in there won't be documented, but the constituent widgets will reside in either the protected or private section of the class. Assuming that's how the widget was built; it's also possible the bits and pieces are simply painted and managed by the class itself.

    If they exist and they're in the protected section, you can gain access to them by extending the class. If they're private, you're out of luck.

    Note that this sort of manipulation carries a fairly high risk of breaking code when built against future releases if the underlying widgets change.

Similar Threads

  1. Events on QScrollBar
    By xiongxiongchuan in forum Qt Programming
    Replies: 7
    Last Post: 16th June 2010, 10:32
  2. QScrollBar within a QMessageBox
    By schall_l in forum Qt Programming
    Replies: 1
    Last Post: 13th April 2010, 14:37
  3. QScrollbar color
    By ntp in forum Qt Programming
    Replies: 0
    Last Post: 28th August 2008, 17:59
  4. QScrollbar stylesheet
    By GuS in forum Qt Programming
    Replies: 34
    Last Post: 4th December 2007, 16:12
  5. QLineEdit and QScrollBar
    By Sarma in forum Qt Programming
    Replies: 4
    Last Post: 8th March 2006, 08:07

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.