[Interest] How to get bounding box of a rotated QML Item ?

Elvis Stansvik elvstone at gmail.com
Thu Jan 7 14:32:25 CET 2016


2016-01-07 12:37 GMT+01:00 Gian Maxera <gmaxera at gmail.com>:
> Hello,
> I have an item that contain a rotated Rectangle. I need to calculate the height and the width of the bounding box of the Rectangle respect to the parent Item. How can I do that ?
>
> Item {
>         width: widthOfBoundingBox
>         height: heightOfBoundingBox
>         Rectangle {
>                 width: 100
>                 height: 100
>                 rotation: 25
>         }
> }

I would say childrenRect ... if it wasn't for this bug:

  https://bugreports.qt.io/browse/QTBUG-38953

So I'm not sure actually :( Strange that there's been no reaction to
that bug in over a year.

Elvis

>
> Thanks,
> Gianluca.
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list