Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. HTML img qrc Resource does not display
QtWS25 Last Chance

HTML img qrc Resource does not display

Scheduled Pinned Locked Moved Mobile and Embedded
androidhtmlressource
8 Posts 2 Posters 4.2k Views
  • 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.
  • D Offline
    D Offline
    didu
    wrote on 10 Apr 2015, 09:23 last edited by didu 4 Oct 2015, 09:24
    #1

    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
    0
    • M Offline
      M Offline
      Malek_Khlif
      wrote on 10 Apr 2015, 09:24 last edited by
      #2

      Try this

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

      I Love Qt &lt;3

      D 1 Reply Last reply 10 Apr 2015, 09:40
      0
      • D Offline
        D Offline
        didu
        wrote on 10 Apr 2015, 09:34 last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • M Malek_Khlif
          10 Apr 2015, 09:24

          Try this

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

          D Offline
          D Offline
          didu
          wrote on 10 Apr 2015, 09:40 last edited by
          #4

          @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
          0
          • M Offline
            M Offline
            Malek_Khlif
            wrote on 10 Apr 2015, 09:57 last edited by
            #5

            can you show me your ressource file ?

            I Love Qt &lt;3

            1 Reply Last reply
            0
            • D Offline
              D Offline
              didu
              wrote on 10 Apr 2015, 09:58 last edited by
              #6

              @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
              0
              • M Offline
                M Offline
                Malek_Khlif
                wrote on 10 Apr 2015, 10:02 last edited by
                #7

                @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
                0
                • D Offline
                  D Offline
                  didu
                  wrote on 10 Apr 2015, 11:38 last edited by didu 4 Oct 2015, 11:57
                  #8

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

                  4/8

                  10 Apr 2015, 09:40

                  • Login

                  • Login or register to search.
                  4 out of 8
                  • First post
                    4/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved