Results 1 to 2 of 2

Thread: Ho do I Expand QGrpahicsView off screen inside a QScrollArea?

  1. #1
    Join Date
    Oct 2009
    Qt products
    Qt4 Qt5 Qt/Embedded
    MacOS X Unix/X11 Windows

    Default Ho do I Expand QGrpahicsView off screen inside a QScrollArea?


    Wondering if someone could help me here. I have a QScrollArea containing various widgets laid out vertically. A label, QListView and at the bottom a QGraphicsView. What I am trying to get to is that the QGraphicsView widget will expand off screen so that by using QScrollArea side bar I can scroll down moving all widgets up.

    The problem I am having is that the Layout the QGraphicsView has been been added to does not expand inside the QScrollArea so what I end up with is a letterbox effect at the bottom of the screen with no change to the QScrollArea.

    I'm not sure if the QLayout which contains the graphics is causing me problems or the QGraphicsView?

    Is there something I am missing.


    Attachment 9098

  2. #2
    Join Date
    Mar 2009
    Brisbane, Australia
    Thanked 1,599 Times in 1,527 Posts
    Qt products
    Qt4 Qt5
    Unix/X11 Windows
    Wiki edits

    Default Re: Ho do I Expand QGrpahicsView off screen inside a QScrollArea?

    Cannot see your attachment.

    The size of the widget inside the scroll area (i.e. the one you call setWidget() with) is not driven by the size of the scroll area view port. You need to set the size of that widget if the size derived automatically from size hints of the contained widgets is not acceptable.

Similar Threads

  1. Replies: 0
    Last Post: 16th July 2012, 10:56
  2. QwtPlot inside QScrollArea
    By mastupristi in forum Qwt
    Replies: 3
    Last Post: 13th October 2009, 05:28
  3. resizing widget inside QScrollArea
    By mastupristi in forum Newbie
    Replies: 4
    Last Post: 16th July 2009, 20:29
  4. Replies: 1
    Last Post: 26th December 2008, 13:59
  5. QScrollArea problem positioning a QWidget inside
    By Spectator in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2006, 23:59


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.