HTML img qrc Resource does not display
-
Hi everyone,
I have create a "About" MessageDialog in qml with a text in html that use the '<img>' html subset.
http://doc.qt.io/qt-4.8/richtext-html-subset.htmlThis dialog correctly display the image in Desktop (Windows/Linux/Mac) but in Android I get a "blue cube".
Does anyone have a idea ?
(I use Qt 5.4)MessageDialog { id: aboutDialog title: "About" text: 'Client Version: ' + Qt.application.version + '<br>' + '<img src=":/images/ic_launcher.png"><br>' icon: StandardIcon.Information onAccepted: visible = false visible: true }
-
Try this
text: 'Client Version: ' + Qt.application.version + '<br>'
+ '<img src="qrc:///images/ic_launcher.png"><br>' -
@Malek_Khlif said:
Try this
text: 'Client Version: ' + Qt.application.version + '<br>'
+ '<img src="qrc:///images/ic_launcher.png"><br>'I have the same result :'(
-
can you show me your ressource file ?
-
@Malek_Khlif said:
can you show me your ressource file ?
<RCC> <qresource prefix="/images"> <file>About.ico</file> <file>ic_launcher.png</file> </qresource> </RCC>
-
@didu said:
<RCC>
<qresource prefix="/images">
<file>About.ico</file>
<file>ic_launcher.png</file>
</qresource>
</RCC>Edit this resource:
<RCC>
<qresource prefix="/images">
<file>About.ico</file>
<file alias"ic_launcher.png">ic_launcher.png</file>
</qresource>
</RCC> -
@Malek_Khlif said:
@didu said:
<RCC>
<qresource prefix="/images">
<file>About.ico</file>
<file>ic_launcher.png</file>
</qresource>
</RCC>Edit this resource:
<RCC>
<qresource prefix="/images">
<file>About.ico</file>
<file alias"ic_launcher.png">ic_launcher.png</file>
</qresource>
</RCC>Also same result :(
Otherwise I have other pictures in same qrc that show perfectly on both platforms !
The only difference is that I use html to display this one !
Does anyone have succeed to display on android with html like I do ?