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. Gauge Styling
Forum Updated to NodeBB v4.3 + New Features

Gauge Styling

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 3 Posters 1.4k 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.
  • A Offline
    A Offline
    apampe
    wrote on last edited by
    #1

    I'm having trouble styling the tickmarkLabel of a Gauge. Following GaugeStyle ( http://doc.qt.io/qt-5/qml-qtquick-controls-styles-gaugestyle.html ) I can set the color of the ticks. Using the same method I can set the color of the tickmarkLabel as well (see below). The problem is that the Label.text content is also replaced, so the label is blank unless I specify the text property. This does show a "123" in black at each major tick! But "123" is incorrect...

        style: GaugeStyle {
            tickmarkLabel: Item {
                 Label {
                    color: "#000000"
                    //text: "123"
                }
            }
        }
    

    So is there a way to override only the tickMarkLabel's color property without replacing the entire Label object which contains the text values of each specific tick?

    includes:
    import QtQuick.Controls.Styles 1.4
    import QtQuick.Extras 1.4

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      @apampe

      So is there a way to override only the tickMarkLabel's color property without replacing the entire Label object which contains the text values of each specific tick?

      AFAIK, No.

      157

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Dan_
        wrote on last edited by
        #3

        Have you tried text: styleData.value ?

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          @Dan_ OP is trying to change color of the text.

          157

          1 Reply Last reply
          0

          • Login

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