Results 1 to 3 of 3

Thread: QScrollArea Not Showing Properly

  1. #1
    Join Date
    Dec 2016
    Posts
    37
    Qt products
    Qt5
    Platforms
    Windows

    Default QScrollArea Not Showing Properly

    I've created a Widget with a QScrollArea inside it, with another widget, scrollAreaContents within the scrollArea.
    scrollAreaContents has a bunch of labels within a vertical layout, and, when I run the app, various labels are spaced out within the scrollArea
    with plenty of spacing between them. Obviously I don't want this extra spacing. So I right click on the scrollArea in the
    designer, go to Layout Alignment and select Top.
    This makes the labels in the scrollArea bunch up like I want it to, but the scrollArea now only takes up half the screen.
    This also I do not want.
    The vertical scroll bar shows up fine as expected. I've disabled the horizontal scrollbar.
    scrollArea also within a vertical layout.

    I've done all this using the Qt designer. I'm required to use this tool.

    Please help. I've tried a bunch of things but nothing seems to work. I've changed the margins and spacing for the top widget
    as well as scrollAreaContents widget to all zeros.

    Thank you for any help.

    n

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QScrollArea Not Showing Properly

    Instead of alignment you could try adding a spacer item as the last item of the layout the labels are in.

    Cheers,
    _

  3. #3
    Join Date
    Dec 2016
    Posts
    37
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QScrollArea Not Showing Properly

    That worked!! Thank you.

Similar Threads

  1. ToolBar Below mainToolBar not showing properly
    By ajMatus in forum Qt Programming
    Replies: 1
    Last Post: 18th March 2016, 23:32
  2. QScrollArea not showing
    By mvbhavsar in forum Newbie
    Replies: 2
    Last Post: 27th October 2014, 19:46
  3. QScrollArea no work properly in QWizardPage object
    By AleG in forum Qt Programming
    Replies: 1
    Last Post: 12th January 2011, 10:23
  4. Replies: 0
    Last Post: 11th August 2010, 11:02
  5. Replies: 2
    Last Post: 10th March 2008, 21:16

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.