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. fontSizeMode: Text.Fit not working with textFormat: Text.RichText but <sub>1</sub> work only with RichText
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 188 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.
  • P Offline
    P Offline
    philxxx609
    wrote on last edited by
    #1

    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
    0

    • Login

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