On Thu, Jun 19, 2014 at 10:59 AM, Alex Montgomery
<apmontgom...@gmail.com> wrote:
> Hello,
>
> I am trying to position an item in a ScrollView such that it doesn't move
> when the vertical scrollbar appears. Basically, I want to leave exactly
> enough room on the right side of the ScrollView for the scrollbar to appear
> without adjusting the contents size.  Is this possible? I can't figure out
> how to determine if a scrollbar is being drawn at a given time, let alone
> figure out how wide it is!
>

I have a border that only shows up when the scrollbar is not visible:

            Rectangle {
                width: 1
                height: parent.height
                color: borderColor
                anchors.right: parent.right
                anchors.top: parent.top
                visible: conversationView.width == scrollArea.width
            }
Where scollArea is the ScrollView and conversationView is a ListView
inside the ScrollView.

Seems like you could use similar logic to figure out what you need.

Ian
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to