[Interest] QML ListView: automatically change width

Dmitry Volosnykh dmitry.volosnykh at gmail.com
Sun Aug 16 17:26:45 CEST 2015


Another way might be using childrenRect.width property.

On Sun, Aug 16, 2015 at 6:22 PM, Igor Mironchik <igor.mironchik at gmail.com>
wrote:

> Hi,
>
> On 16.08.2015 17:27, Dmitry Volosnykh wrote:
>
> Did you try to bind height to contentHeight?
>
>
> Nice idea. It works but I receive next warning:
>
> QML ListView: Binding loop detected for property "width"
>
> It from here:
>
> ListView {
>             anchors.centerIn: parent
>             orientation: ListView.Horizontal
>             model: sampleModel
>             delegate: delegateItem
>             width: contentWidth
>         }
>
>
> On Sun, Aug 16, 2015 at 5:23 PM, Igor Mironchik <igor.mironchik at gmail.com>
> wrote:
>
>> Hi guys,
>>
>> How can I automatically change width of the QML ListView to fit all
>> content?
>>
>> --
>> Best Regards,
>> Igor Mironchik.
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>
>
> --
> Best Regards,
> Igor Mironchik.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150816/618d24bf/attachment.html>


More information about the Interest mailing list