Results 1 to 2 of 2

Thread: Add space after ScrollBar?

  1. #1
    Join Date
    Jul 2017
    Posts
    8
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Add space after ScrollBar?

    I have a QScrollArea with a QGridLayout set via setLayout(). This scroll area is then added to a QMdiSubWindow.

    I have an animation that hides this sub window on a QEvent::Leave, and the problem is that the vertical scroll bar of the QScrollArea is too close to the right edge of the QMdiSubWindow which I am filtering for leave events.

    I need to add a sort of "buffer" region between my vertical scroll bar and the end of the sub window such that the hiding function is not as sensitive.

    Not sure what the best way to do this is... any ideas?

    What I tried was increasing the width of the sub window, also trying to set margins for the grid layout to add space to the right edge, adding a spacer item etc. but unfortunately none of this worked.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Add space after ScrollBar?

    I need to add a sort of "buffer" region between my vertical scroll bar and the end of the sub window such that the hiding function is not as sensitive.
    Not sure I understand the problem...
    For example, how is the behavior different if you leave to the left?
    Then you don't have a scrollbar - and if in that case the behavior is satisfactory, I don't get the problem with the scroll area...

    I must say that how your describe the problem and the proposed solution all sound very "hacky" to me.

    Could you formulate what you need as a requirement?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 0
    Last Post: 4th August 2015, 09:12
  2. QTableView empty space or too little space.
    By davemar in forum Qt Programming
    Replies: 2
    Last Post: 16th October 2009, 16:00
  3. Replies: 1
    Last Post: 26th July 2009, 15:08
  4. 4.5.0-rc1 space help
    By aamer4yu in forum Installation and Deployment
    Replies: 16
    Last Post: 14th March 2009, 16:19
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.