Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVG in QML not showing on Android

Tags:

android

svg

qt

qml

I have a Qt project. In my QML I include an svg image.

   Image {
    id: logo
    width: 90
    height: 25
    source: "logoHorizontalWhite.svg"
    y:25
    anchors.horizontalCenter: parent.horizontalCenter
}

I added XML and svg support in my .pro file

    QT += qml quick widgets svg xml

on iOS and Desktop it shows up correctly, on Android I get the error:

W/EGL_emulation(13992): eglSurfaceAttrib not implemented W/OpenGLRenderer(13992): Failed to set EGL_SWAP_BEHAVIOR on surface 0xa4a10520, error=EGL_SUCCESS D/Qt (13992): (null):0 ((null)): FT_New_Face failed with index 0 : 90 W/Qt (13992): qrc:/LoginForm.qml:21 ((null)): qrc:/LoginForm.qml:21:5: QML Image: Invalid image data: qrc:/logoHorizontalWhite.svg W/EGL_emulation(13992): eglSurfaceAttrib not implemented W/OpenGLRenderer(13992): Failed to set EGL_SWAP_BEHAVIOR on surface 0xa4a10520, error=EGL_SUCCESS

Any ideas what could cause this? Thanks!

like image 995
ceed Avatar asked Oct 31 '22 10:10

ceed


1 Answers

A restart of the simulator solved it.

like image 138
ceed Avatar answered Nov 15 '22 04:11

ceed