Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-51572

CSS in local resource is not picked up

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.8
    • 5.6.0 RC
    • WebEngine
    • None
    • Ie8e7e5ef38f88ae91d892b703cd9702b2637daa2

    Description

      CSS filese that are located in a QRC file are ignored.
      See tst_QWebEnginePage::setHtmlWithStylesheetResource.

      const char* htmlData =
          "<html>"
              "<head>"
                  "<link rel='stylesheet' href='qrc:/style.css' type='text/css' />"
              "</head>"
              "<body>"
                  "<p id='idP'>some text</p>"
              "</body>"
          "</html>";
      

      The (adjusted) test passes with inline CSS:

      const char* htmlData =
          "<html>"
              "<head><style>"
                  "#idP {color: red !important}"
              "</style></head>"
              "<body>"
                  "<p id='idP'>some text</p>"
              "</body>"
          "</html>";
      

      Attachments

        For Gerrit Dashboard: QTBUG-51572
        # Subject Branch Project Status CR V

        Activity

          People

            davidsz Szabolcs David
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes