[Interest] QML: How to set verticalCenterOffset...
Dmitry Volosnykh
dmitry.volosnykh at gmail.com
Sun Aug 16 20:40:46 CEST 2015
You'd better provide your example so that we could run it with qmlscene.
On Sun, Aug 16, 2015 at 9:08 PM, Igor Mironchik <igor.mironchik at gmail.com>
wrote:
> Hi,
>
> I'm trying to center ListView in a Rectangle.
>
> I do:
>
> anchors.centerIn: parent
>
> But it moves ListView under the real center, so I need to add negative
> verticalCenterOffset.
>
> I've tried in ListView:
>
> anchors.verticalCenterOffset: - height / 2.0
>
> But it doesn't work. If I set verticalCenterOffset without calculations,
> i.e. real number then all is ok...
>
> How can I solve the problem?
>
> --
> Best Regards,
> Igor Mironchik.
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150816/5a3d1dd1/attachment.html>
More information about the Interest
mailing list