If the item is set to invisible we set visible to false in
the render and preview puppets. This will have no effect on the
value in the property editor.
Changing the actual value of visible can have side-effects on
the rendering in some rare cases.
Task-number: QDS-4932
Change-Id: I5ce0925ebff8f5e4e64bc71fd5d33d6154b85f91
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Change the form editor rendering to be done by item basis instead of
just rendering the entire scene (unified rendering).
Fixes: QDS-2933
Change-Id: I999cbc834791bc6e96334eab8273d97e4f58975f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Puppet cleanup was not handled properly, so derefFromEffectItem() was
not called for all objects that needed it, causing puppet to crash
at shutdown.
Fixes: QDS-3461
Change-Id: I22c0552fe1223789fa42b276ab377d4a9e929955
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Port QQuickRenderControl rendering used for 3D edit view also for
2D views.
This also fixes the issue of only partially rendered form editor
view for root items with non-origin position by adjusting the
position to 0,0 on the puppet side via an extra injected item.
As a result of the root item always being rendered at origin,
the visualization of the root item offset is no longer visible in
the form editor (the checkerboard background item).
Change-Id: Ide29510ef52513340d205ed35ac35c8cce66715c
Fixes: QDS-3159
Fixes: QDS-3175
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
When grabbing the window we have to clip the window using
the root item size.
Depending on the window manager the window is resized.
Another issue is that when grabbing the window offscreen
the pixel ratio is always 1.
Before we assumed that the pixel ratio of all images
is the same for the host process as for the puppet.
This is not necessarily anymore and we have to set
and forward the correct pixel ratio.
Change-Id: I36b467291ab120f825119adea4ed7db10d34266d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
The image cache is saving images and icon of this images in a sqlite
database. If there are no images they are generated in the backgound.
The icons are fetched by item library.
Task-number: QDS-2782
Task-number: QDS-2783
Task-number: QDS-2858
Change-Id: I5a32cccfef7f8fd8eb78902605a09f5da18ce88e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
When building with Qt 6 or if qmlpuppet_unifiedRenderPath is set
in the environment we switch to a different render path.
In this case we use QQuickWindow::grabWindow() and render the root item.
No composition is done in the Qt Creator process anymore.
This is a similar approach we already take for the 3D view.
Performance is acceptable and we fix rendering issues related to
effects and layers.
Change-Id: Ic963eca047e0bf16ca3a099ec94658ae2af0fb63
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Quick3D Texture elements require some window signals to show QML item
as texture, so we fake them to make textures appear in form editor
and state preview. To prevent texture mirroring, flipV value
is force set at proxy creation. To keep state preview up to date,
we trigger multiple render passes if there are any QML items used
as texture sources in quick3D textures.
Task-number: QDS-2290
Change-Id: I16c34aad943213c0b737fdb073333be3bbd40f2d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
For each created items we retrieve a list of the names
of all existing states.
Task-number: QDS-1978
Change-Id: I8e85e439fce3c6204cb8bcf69f6be847cc8dae5c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This has to be blocked only for the root item.
Task-number: QDS-1979
Change-Id: Ia05255468623fe715e3f7172e2f058a70629b783
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We have to ensure to properly call all Component complete handlers.
A single component usually has QQmlComponentAttached objects,
which we have to iterate over.
Therefore emitComponentCompleteSignalForAttachedProperty() is not correct.
Task-number: QDS-269
Change-Id: I4aed5d511f9f6e21f72efb955fc6db21b70e7c42
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The ImageProvider needs a correct sourceSize. And the puppet needs to
consider the devicePixelRatio.
Change-Id: I408f956fdb4adb23f272c879878e44e88ca76321
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
In some cases items render their children directly using an effect.
In this case we do not want to hide the children when calling
refFromEffectItem().
If the hint takesOverRenderingOfChildren is set in the .metainfo hints
for a parent item we forward a flag to the puppet and refFromEffectItem()
is not hiding this item,
Change-Id: I37a8c0ad8a15bc914c220e03b1b744779431d655
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This is required to correctly render text elements with padding,
since the bounding rect seems incorrect.
Change-Id: Ifcef2607089a7a2cec071814d5d87bd27da7ace3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We forward the device pixel ratio to the qml2puppet and
render items in higher resolutions.
We have to set the device pixel ratio on the pixmap manually,
since it is not serialized.
The option IgnoreDevicePixelRaio allows disabling high dpi awareness.
Rendering in high dpi affects performance, but since we
use shared memory this does not seem to be a serious issue.
Change-Id: Ie9219b8fdb37841c24d4fb3f0ca259f0194ef65c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We evaluate properties for the root item in dummy context if
they contain "parent.".
Defining a parent in the dummy context was not working for QML 2,
because there seems to be a shortcut bypassing the metasystem for parent.
Task-number: QTCREATORBUG-15530
Change-Id: I710f1ef36b8c97cc481b9909a775f06d9e03f666
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
We should not call updateDirtyNode() for items without a window.
This will assert later in consistency checks.
Change-Id: Iff3574123a1497206de88d59fcf630ead57ef593
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
No need to use private API in QuickItemNodeInstance.
Change-Id: I5450ea41571c2787081cc88f59494a28eea5546c
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reduce the use of NodeInstanceMetaObject in QtQuickDesigner code
to two static methods:
- registerNodeInstanceMetaObject
- createNewDynamicProperty
Change-Id: I0ef8ee96995184e968467b799147c6b4c80fbccc
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This avoids sub pixel antialias artefacts.
We call disableNativeTextRendering() in updateDirtyNodesRecursive(), because
items might be created or change the property after component complete.
Change-Id: Icd9c87b69434a910c9555540ba7bafdc874afc5a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
From the quick1 times we always have done a update but it is not any more
useful and it is triggering a repaint which makes the form editor sluggish.
Change-Id: I8103d03c295aa73e14b4b4fcec15b01069c62754
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
We reparented into ignored properties. Now there is a more general mechanism
to prevent this.
Task-number: QTCREATORBUG-11970
Change-Id: Icbd5877dc13c65963079eb3ab67e48bb92056b53
Reviewed-by: Marco Bubke <marco.bubke@digia.com>