QmlPuppet: Return color property

Change-Id: Icc25fb0408aae50f67633688f221194ab6f77cd3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Michael Winkelmann
2020-09-14 12:29:21 +02:00
parent f641434ec1
commit 64a37ec38a

View File

@@ -66,7 +66,10 @@ CapturedDataCommand::StateData collectStateData(ServerNodeInstance rootNodeInsta
nodeData.sceneTransform = instance.sceneTransform();
auto textProperty = instance.property("text");
if (!textProperty.isNull() && instance.holdsGraphical())
nodeData.properties.emplace_back(QString{"text"}, textProperty.toString());
nodeData.properties.emplace_back(QString{"text"}, textProperty);
auto colorProperty = instance.property("color");
if (!colorProperty.isNull())
nodeData.properties.emplace_back(QString{"color"}, colorProperty);
stateData.nodeData.push_back(std::move(nodeData));
}