Results 1 to 2 of 2

Thread: how to set paragraph indent for selected text in QTextEdit

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

    Question how to set paragraph indent for selected text in QTextEdit

    Hi Guys,

    I am trying to create a small app like word. While using word, we can set paragraph indent for selected paragraph or text (we can set the mark from where text should start for that selected paragraph or line)

    How can i achieve the same using QTextEdit? Can someone please help me out on this?

    Thanx in advance

  2. #2
    Join Date
    Nov 2006
    Location
    indonesia
    Posts
    55
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to set paragraph indent for selected text in QTextEdit

    Hi,
    Check QTextEdit documentations about :

    tabChangesFocus : bool
    This property holds whether Tab changes focus or is accepted as input.

    tabStopWidth : int
    This property holds the tab stop width in pixels.

    You can detect a new paragraph by Enter character.
    So, if user press enter keyboard, you can automatically add tab character in the new QTextEdit line.
    Maybe this explaining help you.

    Best regards,

    myta212

Similar Threads

  1. QTextEdit. To make selected text as Bold.
    By KIBSOFT in forum Qt Programming
    Replies: 5
    Last Post: 14th December 2016, 10:47
  2. Can not clear paragraph in QTextEdit
    By December in forum Qt Programming
    Replies: 0
    Last Post: 26th December 2009, 04:57
  3. Replies: 0
    Last Post: 2nd September 2008, 12:01
  4. coordinates of selected text in QTextEdit
    By sreedhar in forum Qt Programming
    Replies: 1
    Last Post: 15th May 2006, 17:22
  5. How to change paragraph number in QTextEdit?
    By Sarma in forum Qt Programming
    Replies: 2
    Last Post: 10th March 2006, 09:42

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.