Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Qml and dinamic text height

    QML and Qt Quick
    3
    4
    1173
    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.
    • mrdebug
      mrdebug last edited by

      Having the number of the rows in a text object how can I increase the high of the text object?
      text.lineHeight returns ever 1 and the not the high of the row in pixel.

      Need programmers to hire?
      www.labcsp.com
      www.denisgottardello.it
      GMT+1
      Skype: mrdebug

      1 Reply Last reply Reply Quote 0
      • dheerendra
        dheerendra Qt Champions 2022 last edited by

        Can you help in adding more details to your question ?. This helps us to answer better.

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply Reply Quote 0
        • mrdebug
          mrdebug last edited by

          Sorry but I haven't got a fluent english.

          I have a quick text object. I will place some text in it and I want to increase or decrease its height property on the basis of how much of lines of text.
          Is possible?

          Need programmers to hire?
          www.labcsp.com
          www.denisgottardello.it
          GMT+1
          Skype: mrdebug

          1 Reply Last reply Reply Quote 0
          • B
            Babalas last edited by

            Ugly but works

            @ property real rowHeight: textHeight.height
            Text{ id: textHeight; visible: false; text: "Hello World"}

            TextArea {
            height: rowHeight * model.length
            }
            @

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