Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
5.3.0
-
Windows 7 using Desktop Qt 5.3.0 MSVC2013 OpenGL 64bit
Description
Below is a short example QML which can be run to illustrate the problem.
The canvas is anchored to the rectangle.
When running, if you resize the rectangle smaller the canvas follows - ok. If you resize the rectangle larger than the initial size the canvas does not follow but rather stops at the original size. Note the behavior of the border when the rectangle exceeds its original size.
In 5.2.1 using MSVC2012 and OpenGL this example works normally (canvas always follows rectangle's size).
import QtQuick 2.0 Rectangle { width: 400; height: 400 Canvas { id: canvas // canvas size anchors.fill: parent // handler to override for drawing onPaint: { // get context var ctx = getContext("2d") // setup the stroke ctx.lineWidth = 8 ctx.strokeStyle = "blue" // setup the fill ctx.fillStyle = "steelblue" // make a rectangle with a border ctx.fillRect(0, 0, canvas.width, canvas.height) ctx.strokeRect(0, 0, canvas.width, canvas.height) } } }
Attachments
Issue Links
- relates to
-
QTBUG-39114 Qt 5.3.0 regerssion -- Resizing canvas causes issues with painting
- Closed