Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [BUG] Some styles does not work (background-color, background-image)
Forum Updated to NodeBB v4.3 + New Features

[BUG] Some styles does not work (background-color, background-image)

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 2 Posters 1.5k Views 1 Watching
  • 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.
  • Q Offline
    Q Offline
    QtYury
    wrote on 8 Sept 2014, 09:22 last edited by
    #1

    Works:
    @
    Label {
    text: "<span style="color: red">Del</span>"
    textFormat: Text.RichText
    }
    @

    Does not work:
    @
    Label {
    text: "<span style="background-color: red">Del</span>"
    textFormat: Text.RichText
    }
    @
    @
    Label {
    text: "<span style="background-image: some_url">Del</span>"
    textFormat: Text.RichText
    }
    @

    1 Reply Last reply
    0
    • P Offline
      P Offline
      p3c0
      Moderators
      wrote on 8 Sept 2014, 09:37 last edited by
      #2

      Hi,

      This is a bug. See "QTBUG-34219":https://bugreports.qt-project.org/browse/QTBUG-34219

      157

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        QtYury
        wrote on 8 Sept 2014, 09:47 last edited by
        #3

        Thanks, p3c0! Are there any workarounds?

        1 Reply Last reply
        0
        • P Offline
          P Offline
          p3c0
          Moderators
          wrote on 8 Sept 2014, 09:51 last edited by
          #4

          You could use a Rectangle and Image elements and place it behind the Text and setting width and height of those to that of Text element.

          157

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            QtYury
            wrote on 8 Sept 2014, 09:52 last edited by
            #5

            border-color and border-style don't work too
            @
            Label {
            text: "<span style="border-color:red; border-style:solid">Del</span>"
            textFormat: Text.RichText
            }
            @

            1 Reply Last reply
            0
            • P Offline
              P Offline
              p3c0
              Moderators
              wrote on 8 Sept 2014, 09:57 last edited by
              #6

              Yes I think "many of these":https://qt-project.org/doc/qt-5/richtext-html-subset.html#css-properties may not be working.

              157

              1 Reply Last reply
              0
              • Q Offline
                Q Offline
                QtYury
                wrote on 9 Sept 2014, 12:47 last edited by
                #7

                Please vote for bug "QTBUG-34219":https://bugreports.qt-project.org/browse/QTBUG-34219. Thanks!

                1 Reply Last reply
                0

                6/7

                8 Sept 2014, 09:57

                • Login

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