Results 1 to 2 of 2

Thread: text indent with wrap

  1. #1
    Join Date
    Sep 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default text indent with wrap

    Hi,everyone

    How can implement text indent with text item on line first ?
    For example, like this:

    (indent 20px) text text text text text texttext text
    text texttext texttext texttext texttext texttext.

    I can get the same result with the following code, but it is not too accurate.(use some blank)
    Text {
    width: 200
    wrapMode: Text.Wrap
    text: "  " + " text text text text text texttext text text texttext texttext texttext texttext texttext.."
    }

    What's the right way to realize it ?

  2. #2
    Join Date
    Aug 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: text indent with wrap

    mp_textEdit->setText("<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; text-indent:20px;\">the showing text</p>");

Similar Threads

  1. How to wrap text in a label?
    By sasi in forum Qt Programming
    Replies: 5
    Last Post: 22nd October 2016, 04:14
  2. Custom Delegate and Text Wrap
    By enlightened_j in forum Newbie
    Replies: 2
    Last Post: 17th September 2010, 06:21
  3. Long text and word wrap in QPainter
    By TomASS in forum Qt Programming
    Replies: 2
    Last Post: 11th December 2009, 11:50
  4. Wrap Text in PUSHBUTTON
    By BalaQT in forum Qt Programming
    Replies: 2
    Last Post: 16th September 2009, 13:54
  5. how can I make a balloon to wrap the editable text?
    By learning_qt in forum Qt Programming
    Replies: 9
    Last Post: 20th January 2009, 15:09

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.