Results 1 to 4 of 4

Thread: QTableView and its Scrollbar question

  1. #1
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default QTableView and its Scrollbar question

    Hi to all!

    I have subclassed QTableView and I use this class to show a kind of shopping cart. Now, the table view's apperaence was heavly customized, but when vertical and horizontal scroll bars appear, they are default. I need them to repaint with different color (palette) and to make them wider. What is the way of doing it? Is it possible to "install" subclassed QScrollBar into QTableView?
    Qt 5.3 Opensource & Creator 3.1.2

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTableView and its Scrollbar question

    QTableView is a QAbstractScrollArea which has the methods you are looking for. But notice also style sheets...
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QTableView and its Scrollbar question

    So, I must reimplement a whole new QAbstractScrollArea or what?
    Qt 5.3 Opensource & Creator 3.1.2

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTableView and its Scrollbar question

    Quote Originally Posted by MarkoSan View Post
    So, I must reimplement a whole new QAbstractScrollArea or what?
    No, just look at those functions it offers:
    J-P Nurmi

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

    MarkoSan (28th May 2008)

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.