Results 1 to 2 of 2

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

  1. #1
    Join Date
    Oct 2009
    Posts
    22
    Thanks
    2
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

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

    Hi,

    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.

    Thanks.

    Attachment 9098

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    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, 09:56
  2. QwtPlot inside QScrollArea
    By mastupristi in forum Qwt
    Replies: 3
    Last Post: 13th October 2009, 04:28
  3. resizing widget inside QScrollArea
    By mastupristi in forum Newbie
    Replies: 4
    Last Post: 16th July 2009, 19:29
  4. Replies: 1
    Last Post: 26th December 2008, 12:59
  5. QScrollArea problem positioning a QWidget inside
    By Spectator in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2006, 22:59

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.