diff options
author | Ken Moore <ken@ixsystems.com> | 2018-01-09 11:36:46 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2018-01-09 11:36:46 -0500 |
commit | 767299a7f0da138ab1a097b05de6d9afe2827cf7 (patch) | |
tree | e739f778d1899c5fbb93fa4a545388d00912e0a0 /src-qt5 | |
parent | Get the window appearing now (compositing disabled at the moment) (diff) | |
download | lumina-767299a7f0da138ab1a097b05de6d9afe2827cf7.tar.gz lumina-767299a7f0da138ab1a097b05de6d9afe2827cf7.tar.bz2 lumina-767299a7f0da138ab1a097b05de6d9afe2827cf7.zip |
Get the QML reading the raw QImage data using the HTML data format (base64).
This results in a usable image, but it flickers quite badly when the image changes. Might need to look into a QImageProvider that allows QML to read/use the raw image data rather than base64 as the transport medium.
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.cpp index dcfd23b0..e9049cdd 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/NativeWindowObject.cpp @@ -67,8 +67,9 @@ void NativeWindowObject::setProperty(NativeWindowObject::Property prop, QVariant QBuffer buffer(&ba); buffer.open(QIODevice::WriteOnly); val.value<QImage>().save(&buffer, "PNG"); - QString img("data:image/png:base64,"); + QString img("data:image/png;base64,"); img.append(QString::fromLatin1(ba.toBase64().data())); + qDebug() << "Image Data Header:" << img.section(",",0,0); hash.insert(prop, img); //save the string instead } else{ hash.insert(prop, val); } @@ -87,8 +88,9 @@ void NativeWindowObject::setProperties(QList<NativeWindowObject::Property> props QBuffer buffer(&ba); buffer.open(QIODevice::WriteOnly); vals[i].value<QImage>().save(&buffer, "PNG"); - QString img("data:image/png:base64,"); + QString img("data:image/png;base64,"); img.append(QString::fromLatin1(ba.toBase64().data())); + qDebug() << "Image Data Header:" << img.section(",",0,0); hash.insert(props[i], img); //save the string instead }else{ hash.insert(props[i], vals[i]); |