P
P
Pavel K2019-11-07 01:09:02
Qt
Pavel K, 2019-11-07 01:09:02

How to make QQuickPaintedItem draw in negative coordinates?

Greetings!
There is a class inherited from QQuickPaintedItem.
I output it in QML, for example:

SceneItem {
        id: sceneItem
        width: 200
        height: 200
        anchors.centerIn: parent
        clip: false
}

In the paint(QPainter * painter) function, respectively, I display it for drawing.
But here it was necessary to draw in negative coordinates, but this is not displayed from the QML side, although clip: false is set (and everywhere higher in the hierarchy).
PS I really don't want to shift the rest of the rendering so that there are always positive coordinates. Is it possible to get out somehow? Maybe I forgot what property to register ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2019-11-07
@Zifix

And if negative coordinates are done to the element itself (say, by negative margin), and not in C ++?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question