Skip to content
Snippets Groups Projects
Commit 54f953b3 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Felix Paul Kühne
Browse files

qml: let `grabToImage()` do the off-screen rendering in DragItem

Trying to use `grabToImage()` on an invisible item
reportedly caused issues, possibly due to lack of
polish call or children just not getting ready as
soon as they are made visible off-screen.

With Qt 6, this does not seem to apply anymore.
Instead of rendering off-screen manually, it should
be a better idea to just let `grabToImage()` do that
itself.
parent 694d51a7
No related branches found
No related tags found
1 merge request!5984qml: let `grabToImage()` do the off-screen rendering in DragItem
Pipeline #511828 passed with stages
in 32 minutes and 13 seconds
......@@ -132,10 +132,6 @@ Item {
enabled: false
// Offscreen render:
layer.enabled: true
layer.effect: Item { }
function _setData(data) {
console.assert(data.length === indexes.length)
_data = data
......@@ -191,11 +187,7 @@ Item {
const requestId = ++dragItem._grabImageRequest
visible = true
const s = dragItem.grabToImage(function (result) {
visible = false
if (requestId !== dragItem._grabImageRequest
|| fsmDragInactive.active)
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment