Results 1 to 2 of 2

Thread: enhanced scrollbar in Qt

  1. #1
    Join Date
    Jul 2012
    Posts
    247
    Thanks
    29
    Thanked 15 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default enhanced scrollbar in Qt

    hey,


    I am interested in adding an "enhanced scrollbar" to my qt application.
    An "enhanced Scvrollbar" is a scrollbar, that displays information in its background, like the ones in VS2013.

    picture:
    ScrollBar-in-VisualStudio-2013.jpg

    I would really like to keep using a QScrollBar based widget, so that i maintain the look and feel of the platform. However, sublassing QScrollBar and overwriting the paintevent wont
    do the trick, as would have to be able to draw the slider and the up/down arrows separately.

    "styling" the scrollbar is not an option, because i want ot draw complex custom information in its background.

    Has this been done before?


    happy new year everyone!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: enhanced scrollbar in Qt

    You can draw all sub-components of a scrollbar via QStyle API so subclassing and reimplementing paintEvent() is the right approach.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. ScrollBar
    By A9am in forum Newbie
    Replies: 5
    Last Post: 8th November 2011, 06:23
  2. How to add scrollbar...?
    By jojanpm in forum Qt Programming
    Replies: 4
    Last Post: 25th October 2010, 18:51
  3. ScrollBar
    By damodharan in forum Qt Programming
    Replies: 1
    Last Post: 11th February 2010, 14:50
  4. Problem with the scrollbar
    By mani_cbz in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 14th July 2009, 09:24
  5. Scrollbar
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 31st October 2007, 07:33

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.