Skip to content
Snippets Groups Projects
Commit c884f629 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.Instances: custom rendering for QQuickWindow


Change-Id: Id2d9bd6b7f5cecefffddece30bb93a69699beeff
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent 4786cee9
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,24 @@ QObject *QuickWindowNodeInstance::parent() const
return 0;
}
QImage QuickWindowNodeInstance::renderImage() const
{
/*
Since the content item transucient
we just fill an image with the window color
*/
QRectF renderBoundingRect = boundingRect();
QImage renderImage(renderBoundingRect.size().toSize(), QImage::Format_ARGB32_Premultiplied);
QPalette palette;
renderImage.fill(palette.color(QPalette::Window).rgba());
return renderImage;
}
QuickWindowNodeInstance::Pointer QuickWindowNodeInstance::create(QObject *object)
{
QQuickWindow *quickWindow = qobject_cast<QQuickWindow*>(object);
......
......@@ -62,7 +62,7 @@ public:
bool isAnchoredBySibling() const Q_DECL_OVERRIDE;
QImage renderImage() const Q_DECL_OVERRIDE;
protected:
QuickWindowNodeInstance(QQuickWindow*);
......
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