[Interest] [Quick Controls 2] Best way to add binding arrow tip to Popup?
Jérôme Godbout
jerome at bodycad.com
Thu Oct 6 20:30:17 CEST 2016
My bad, oups 90 deg and bad rotation center...
Item
{
id: component
property real sizing: 100
property alias color: rect_.color
property alias border: rect_.border
width: sizing
height: sizing
clip: true
Rectangle
{
id: rect_
width: component.width
height: component.height
color: "gray"
transform: Rotation { angle: 45 }
// change the translation values based on orientation here
x: component.width * -0.5
y: 0
}
}
On Thu, Oct 6, 2016 at 2:19 PM, Jérôme Godbout <jerome at bodycad.com> wrote:
> More a workaround then a real solution, but could work as long as the
> triangle is still sharp 90 angle.
>
> Item
> {
> id: component
> property real sizing: 10
> property alias color: rect_.color
> property alias border: rect_.border
> width: sizing
> height: sizing
> clip: true
>
> Rectangle
> {
> id: rect_
> width: component.width
> height: component.height
> color: "gray"
> // change the rotation values based on orientation here
> transform: Rotation { origin.x: 0; origin.y: 0; angle: 90 }
> }
> }
>
> On Thu, Oct 6, 2016 at 7:12 AM, Oleg Evseev <ev.mipt at gmail.com> wrote:
>
>> Hi everyone,
>>
>> I'm interesting how to add arrow tip to popup, that looks like this:
>>
>>
>>
>> If I understand correctly, according to http://doc.qt.io/qt-5/qtquick-
>> scenegraph-customgeometry-example.html I have an option to do custom
>> shape qt quick item instead of simple rectangle with help of QSGGeometry.
>>
>> Is this a best way to do such things?
>>
>> Thanks in advance for recommendations.
>>
>> ---
>> Regards, Oleg
>>
>> _______________________________________________
>> 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/20161006/7bdabf2c/attachment.html>
More information about the Interest
mailing list