Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    HTML img qrc Resource does not display

    Mobile and Embedded
    android html ressource
    2
    8
    3536
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • didu
      didu last edited by didu

      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.html

      This 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
      }
      
      1 Reply Last reply Reply Quote 0
      • Malek_Khlif
        Malek_Khlif last edited by

        Try this

        text: 'Client Version: ' + Qt.application.version + '<br>'
        + '<img src="qrc:///images/ic_launcher.png"><br>'

        I Love Qt &lt;3

        didu 1 Reply Last reply Reply Quote 0
        • didu
          didu last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • didu
            didu @Malek_Khlif last edited by

            @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 :'(

            1 Reply Last reply Reply Quote 0
            • Malek_Khlif
              Malek_Khlif last edited by

              can you show me your ressource file ?

              I Love Qt &lt;3

              1 Reply Last reply Reply Quote 0
              • didu
                didu last edited by

                @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>
                
                1 Reply Last reply Reply Quote 0
                • Malek_Khlif
                  Malek_Khlif last edited by

                  @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>

                  I Love Qt &lt;3

                  1 Reply Last reply Reply Quote 0
                  • didu
                    didu last edited by didu

                    @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 ?

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post