Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Ask about the QTextEdit problem

Ask about the QTextEdit problem

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 574 Views
  • 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.
  • T Offline
    T Offline
    TANG JI QIANG_CHINA_
    wrote on last edited by
    #1

    I need to add the vertical centering function of the text in the QTextEdit class, which needs to calculate the height of the text, and the height of the text does not include the margin of the document. How I get the height of the text.

    jsulmJ 1 Reply Last reply
    0
    • T Offline
      T Offline
      TANG JI QIANG_CHINA_
      wrote on last edited by
      #6

      0_1531982307318_QQ图片20180719143812.png 0_1531982314118_QQ图片20180719143753.png

      1 Reply Last reply
      0
      • T TANG JI QIANG_CHINA_

        I need to add the vertical centering function of the text in the QTextEdit class, which needs to calculate the height of the text, and the height of the text does not include the margin of the document. How I get the height of the text.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @TANG-JI-QIANG_CHINA_ "vertical centering function of the text" - what do you mean by this?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • T Offline
          T Offline
          TANG JI QIANG_CHINA_
          wrote on last edited by
          #3

          @jsulm said in Ask about the QTextEdit problem:

          @TANG-JI-QIANG_CHINA_ "vertical centering function of the text" - what do you mean by this?

          The text is displayed in the middle of the vertical direction of the document

          jsulmJ 1 Reply Last reply
          0
          • T TANG JI QIANG_CHINA_

            @jsulm said in Ask about the QTextEdit problem:

            @TANG-JI-QIANG_CHINA_ "vertical centering function of the text" - what do you mean by this?

            The text is displayed in the middle of the vertical direction of the document

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @TANG-JI-QIANG_CHINA_ Then you would need to put empty lines at the top of the document, I guess?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • T Offline
              T Offline
              TANG JI QIANG_CHINA_
              wrote on last edited by
              #5

              Setting the top margin of the document

              1 Reply Last reply
              0
              • T Offline
                T Offline
                TANG JI QIANG_CHINA_
                wrote on last edited by
                #6

                0_1531982307318_QQ图片20180719143812.png 0_1531982314118_QQ图片20180719143753.png

                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