Results 1 to 3 of 3

Thread: QScrollArea horizontal scrollbar problem

  1. #1
    Join Date
    Apr 2013
    Posts
    4
    Thanks
    2
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11

    Default QScrollArea horizontal scrollbar problem

    Hi, I am having a problem with qt scroll bar, please check my attached screenshot.
    Screenshot from 2013-04-07 04:09:39.jpg
    I loaded 2 pdf files. The first one only has a few pages so the horizontal scrollbar is hidden, and this looks good.
    The 2nd file has too many pages so the horizontal scrollbar is shown. Now, the problem is that scrollbar takes some space, so the vertical scroll bar is also visible.
    I want to hide that vertical scroll bar, so I guess I will need to extend the height of my pdf widget a little bit, how can I get the height of that horizontal scrollbar? And is there any better solution?

  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: QScrollArea horizontal scrollbar problem

    Don't know for sure, but I would have a look at QStyle::pixelMetric() with QStyle::PM_SliderThickness or QStyle::PM_SliderControlThickness.

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

    Default Re: QScrollArea horizontal scrollbar problem

    One can also try horizontalScrollBar()->sizeHint().height().
    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. QCompleter with horizontal ScrollBar
    By vajindarladdad in forum Newbie
    Replies: 2
    Last Post: 31st August 2009, 06:01
  2. QTreeWidget horizontal scrollbar
    By ttvo in forum Qt Programming
    Replies: 1
    Last Post: 16th July 2009, 16:44
  3. Horizontal scrollbar problem
    By blaylockr in forum Newbie
    Replies: 2
    Last Post: 21st July 2008, 17:38
  4. Replies: 2
    Last Post: 10th March 2008, 20:16
  5. Horizontal scrollbar tracking problem
    By tebessum in forum Qt Programming
    Replies: 1
    Last Post: 23rd December 2006, 23:15

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.