Results 1 to 4 of 4

Thread: QTextEdit bottom margin

  1. #1
    Join Date
    Jan 2011
    Posts
    23
    Qt products
    Platforms
    Windows

    Question QTextEdit bottom margin

    hi guys,

    i am trying to draft a letter in QTextEdit for which i need to DECREASE BOTTOM MARGIN can some plz help me how can i change only bottom margin for text edit using PyQt4

    thanx in advance
    ad3d

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: QTextEdit bottom margin

    You can use HTML (setHtml()), and if you do, you can style your text with HTML.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2011
    Posts
    23
    Qt products
    Platforms
    Windows

    Question Re: QTextEdit bottom margin

    Problem is when I am trying to print the text in textEdit using printer, only 1line gets printed on the next page..to avoid this I want to set bottom margin for a page such that that single line will get printed on 1st page itself..

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: QTextEdit bottom margin

    I think you should use QPrinter::setPageMargins() for that.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 1
    Last Post: 9th February 2011, 23:06
  2. Scrolling to bottom of Qt 4 QTextEdit
    By DiamonDogX in forum Qt Programming
    Replies: 0
    Last Post: 8th March 2010, 16:31
  3. insert image at the bottom of QTextEdit
    By Cortex in forum Qt Programming
    Replies: 12
    Last Post: 24th October 2009, 15:22
  4. Replies: 3
    Last Post: 5th February 2009, 15:32
  5. Change margin on QTextEdit print()
    By Dii in forum Qt Programming
    Replies: 2
    Last Post: 20th May 2008, 22:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.