Results 1 to 16 of 16

Thread: QScrollArea vs. QAbstractScrollArea

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QScrollArea vs. QAbstractScrollArea

    QPaintDevice is pure virtual
    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.


  2. #2
    Join Date
    Jun 2006
    Posts
    81
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    6
    Thanked 5 Times in 4 Posts

    Default Re: QScrollArea vs. QAbstractScrollArea

    Quote Originally Posted by wysota View Post
    QPaintDevice is pure virtual
    That's ok. Just declare QAbstractScrollArea::setViewport(QPaintDevice *); and leave it to the caller if he passes a QWidget or another QPaintDevice instance. If there isn't a good reason for a QWidget formal parameter, that is...

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

    Default Re: QScrollArea vs. QAbstractScrollArea

    Well... the viewport is a widget. The abstract scroll area is composed of the "main" widget, two scrollbars and a viewport. At some point you need to draw on the viewport and if you were drawing on anything else than a widget (like a printer) it might be hard to copy the result to screen later on.
    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.


  4. #4
    Join Date
    Jun 2006
    Posts
    81
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    6
    Thanked 5 Times in 4 Posts

    Default Re: QScrollArea vs. QAbstractScrollArea

    Quote Originally Posted by wysota View Post
    if you were drawing on anything else than a widget (like a printer) it might be hard to copy the result to screen later on.
    Good point.

    I think I'd rather not pester you further on this unless I achieve better permeation of the topic...
    For I might want to resort to your help again in the future.

    Thank you!

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

    Default Re: QScrollArea vs. QAbstractScrollArea

    Don't worry, there is no risk for you
    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. several questions about QScrollArea
    By Sheng in forum Qt Programming
    Replies: 1
    Last Post: 4th June 2009, 16:59
  2. Replies: 1
    Last Post: 13th September 2008, 12:00
  3. Dynamic updates of a QWidget in a QScrollArea
    By plamkata in forum Qt Programming
    Replies: 2
    Last Post: 21st July 2008, 00:45
  4. QScrollArea and resizing
    By rarefluid in forum Qt Programming
    Replies: 8
    Last Post: 22nd July 2007, 15:18
  5. Replies: 2
    Last Post: 8th October 2006, 21:14

Tags for this Thread

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.