Qt Forum

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

    Forum Updated on Feb 6th

    Solved TextEdit Alignment vertical/horizontal center error.

    General and Desktop
    3
    6
    266
    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
      Pada_ last edited by

      Qt 5.4 I use Linux 64Bit.

      If you double click a cell in QTableVeiw, QTextEdit will appear in the corresponding place and connect the delegate so that it can be modified.

      Vertical / Horizontal I want to create a TextEdit in both directions, but it is only Horizontal.

      How do you get it to occur in the middle of TextEdit when the cursor grows?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by SGaist

        Hi,

        AFAIK, QTextEdit doesn't support vertical alignment of text. That's only available in the rendered cell.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        P 1 Reply Last reply Reply Quote 0
        • Pradeep P N
          Pradeep P N last edited by Pradeep P N

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • P
            Pada_ @SGaist last edited by

            @SGaist

            I want to be able to modify the cell by double-clicking on the cell.

            To do this, I show TextEdit, but I can not write because it is not vertically aligned.

            I tried to use QLabel and it did not appear when I double-clicked the blank. Is there a way to show it in vertical alignment?

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by SGaist

              Are you using custom QStyledItemDelegate ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              P 1 Reply Last reply Reply Quote 0
              • P
                Pada_ @SGaist last edited by

                @SGaist

                I am using your delegate.
                QTextEdit now appears when you double-click Cell, and you can create multiple lines.

                QLabel becomes Vertical Align, but if you double click cell without text, Edit Mode does not work.

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