Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved fontSizeMode: Text.Fit not working with textFormat: Text.RichText but <sub>1</sub> work only with RichText

    QML and Qt Quick
    1
    1
    69
    Loading More Posts
    • 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.
    • P
      philxxx609 last edited by

      Hello, I need to have subscript on my text in QML but it's only recognized with RichText but fontSizeMode: Text.Fit doesn't work with RichText , how can I make it work?

      Text{
                      id:endMainCharge01TpsDataTitle
                      Layout.preferredWidth: parent.width/6
                      Layout.preferredHeight: parent.height/14
                      wrapMode: Text.WordWrap
                      textFormat: Text.RichText
                      text:"<small>Duration main charge 0.1C<sub>1</sub>A (min)</small>"
                      padding: 5
                      Layout.alignment : Qt.AlignRight
                      fontSizeMode: Text.Fit
                      minimumPixelSize: 1
                      font:theme.headerFont
                  }
      

      thank a lot for your help!!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post