I want to use the asynchronous property of a Shape object
Unsolved
QML and Qt Quick
-
I'm having trouble adapting the asynchronous property of a Shape object.
import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Shapes 1.15 Window { width: 300 height: 300 visible: true title: qsTr("Hello World") Shape { id: myShape anchors.fill: parent asynchronous: true ShapePath { id: myShapePath strokeWidth: 5 strokeColor: "#00ff00" fillColor: "#00aa00" startX: 20 startY: 20 PathLine { x: 60; y: 150; } PathLine { x: 200; y: 200; } PathLine { x: 40; y: 250; } PathLine { x: 20; y: 20; } } } }
When I run it, asynchronous is not working.
Therefore, I added the following to main.cpp.
QSurfaceFormat format; format.setSamples(8); QSurfaceFormat::setDefaultFormat(format);
Then, the asynchronous setting worked.
However, this setting will be reflected in everything in the source.
(The setting works even if asynchronous is false.)If possible, I want to set the presence or absence of asynchronous for each object, so
Is there a way to set it in the property?