Results 1 to 6 of 6

Thread: QAbstractScrollArea scrollbar positions

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jun 2011
    Posts
    56
    Qt products
    Qt4
    Thanks
    7

    Default Re: QAbstractScrollArea scrollbar positions

    Thanks, but even without the map, as I wrote, the result is QPoint(0, 0). Are the QAbstractView's scrollbars part of the viewport, or are they outside of them? Basically, for testing purposes I'd like to do:

    Qt Code:
    1. QPainter painter(this);
    2. painter.fillRect(rect(), Qt::yellow);
    To copy to clipboard, switch view to plain text mode 

    Of course, this doesn't work because of the QAbstractScrollArea. So how could I erase the background of QAbstractViewItem manually?

    EDIT:
    Would it be possible to filter paint events of the viewport() or the both *ScrollBar()s and do some painting before forwarding the event?
    Last edited by ugluk; 12th September 2011 at 15:24.

Similar Threads

  1. Styling QAbstractScrollArea / QListWidget
    By rmwatson in forum Qt Programming
    Replies: 1
    Last Post: 26th June 2010, 23:57
  2. QAbstractScrollArea metrics
    By Olivier Berten in forum Qt Programming
    Replies: 0
    Last Post: 1st February 2010, 08:18
  3. QScrollArea vs. QAbstractScrollArea
    By zaphod.b in forum Qt Programming
    Replies: 15
    Last Post: 7th July 2009, 15:26
  4. QAbstractScrollArea::setViewportMargins() not working :(
    By montylee in forum Qt Programming
    Replies: 7
    Last Post: 21st January 2009, 15:52
  5. QAbstractScrollArea and paintEvent
    By babu198649 in forum Newbie
    Replies: 13
    Last Post: 4th August 2008, 10:56

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.