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

Allow base64 encoded images in QSS (CSS) files

    XMLWordPrintable

Details

    Description

      My application allows external stylesheets however designer's need to set some images, not only styles. For example, checkbox images. This is how I load external CSS file:

          QFile css_file(QString(DEFAULT_CSS_FILE));
          css_file.open(QFile::ReadOnly);
          QString css = QLatin1String(css_file.readAll());
          application->setStyleSheet(css);
      

      And I need this to work, for example:

      QCheckBox::indicator:unchecked {
        image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAIAAAD9iXMrAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABASURBVChTY2xoaGAgBOrr6xkIqjtw4MD///+ZIGYBWbgARAFUHSGbR9XhCCEWoDgwxA8ePIg/CBmB0UAwkIEKAK8fLDh/nomSAAAAAElFTkSuQmCC");
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            bugs everywhere MXXIV
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes