Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
Description
Shape is documented to use QPainterPath internally (https://doc.qt.io/qt-6/qml-qtquick-shapes-shape.html), and QPainterPath supports subtraction operations (https://doc.qt.io/qt-6/qpainterpath.html#subtracted)
However, it is currently not possible to perform subtraction on Shape/ShapePath objects, or to pass a custom C++ subtracted QPainterPath to a Shape. It would be useful to support one or both of these.
Workaround
Qt 6.8 introduced a new (private) method, QQuickPath::setPath(const QPainterPath &path) (https://codereview.qt-project.org/c/qt/qtdeclarative/+/576288 ). So, we can currently use private API to pass a QPainterPath from C++ (see attached example, which works with Qt 6.8.0-beta3)
Attachments
Issue Links
- relates to
-
QTBUG-127121 Potential linegraphs performance improvements
-
- Closed
-
-
QTBUG-72839 No way to construct qml Path from QPainterPath
-
- Reported
-