Results 1 to 6 of 6

Thread: Styling ScrollBar of QWebView via Qt StyleSheets?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Styling ScrollBar of QWebView via Qt StyleSheets?

    Im asking the same question that was asked a yr back, Iam not able to style the QScrollBar component of QWebView, by just adding
    QScrollBar:Vertical and QScrollBar::handle parameters.

    Is this is a feature not supported, is there anyway to paint the QScrollBar component of QWebView.

  2. #2
    Join Date
    Mar 2006
    Location
    Argentina - CABA
    Posts
    66
    Qt products
    Platforms
    Unix/X11
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: Styling ScrollBar of QWebView via Qt StyleSheets?

    Hi,

    Any tip about this Guys?

    Cheers.
    Gustavo A. DÃ*az
    artistic.gdnet.com.ar

  3. #3
    Join Date
    Dec 2010
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Styling ScrollBar of QWebView via Qt StyleSheets?

    For now you need to hack around it, you can easily change the width as documented here:
    http://developer.qt.nokia.com/faq/an...ar_of_qwebview

    Note sure if other things besides the width can be easily changed.

  4. #4
    Join Date
    Mar 2010
    Posts
    9
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default Re: Styling ScrollBar of QWebView via Qt StyleSheets?

    Well, you CAN'T do this by Qt Style Sheets, the only way to customize QWebView scroll bars is to use CSS, since WebKit supports scrollbar customization.
    See http://www.webkit.org/blog/363/styling-scrollbars/ for examples. This way worked well for me.
    You even do not have to have separate image files, you can use base64 encoding in CSS, just like this:

    background-image:url(data:image/png;base64,<base64 encoded png image>);

    Of course, this works only for your custom web pages, for all others pages you can inject your CSS in theirs code.

  5. The following user says thank you to papius_vtualetius for this useful post:

    Cupidvogel (27th February 2016)

Similar Threads

  1. Replies: 5
    Last Post: 21st July 2010, 22:51

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.