Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

problem QPlainTextEdit setTopMargin



  • Hello.

    I have problem to use the setTopMargin on QPlainTextEdit .
    Not working.
    QTextEdit work fine.
    Area there another mehotd to do the same soluction?

            tc = self.textCursor()
            tc.movePosition(QTextCursor.Start)
            tc.movePosition(QTextCursor.Down, QTextCursor.MoveAnchor, 5)
            tc.movePosition(QTextCursor.Right, QTextCursor.MoveAnchor, 0)
            fmt = tc.blockFormat()
            fmt.setTopMargin((18 * 6))
            tc.setBlockFormat(fmt)

  • Lifetime Qt Champion

    Hi,

    As explained in the documentation QPlainTextEdit only supports limited text formatting.


Log in to reply