Unsolved Canvas / Context2D in Qt4.8
-
With a project I need to use the very old Qt4.8 and I cannot use the
Canvas
object to draw withContext2D
. I tried to search in the docs but I'm not sure what was the right method on that release. -
Hi,
What are you trying to do ?
-
Something like this:
Canvas { id: canvas anchors.fill: parent onPaint: { var ctx = canvas.getContext('2d'); ctx.reset(); ctx.lineWidth = 4; ctx.strokeStyle = "red" ctx.beginPath() ctx.moveTo(root.width / 2, 24) ctx.lineTo(root.width * 0.9, 24) ctx.stroke() ctx.beginPath() ctx.fillStyle = "red" ctx.arc(root.width * 0.9, 24, 6, 0, 360) ctx.fill() } }
-
You'll have to do a "reverse port". See here for the differences between QtQuick 1 and 2
-
Most of the link lead to error 404. I will try to Google them. Thanks
-
The documentation has changed a bit. The links have been updated.