Results 1 to 2 of 2

Thread: QTextEdit and HTML div line aligned

  1. #1

    Default QTextEdit and HTML div line aligned

    Hi

    I'm looking for a way for show a sequence of HTML div elements aligned in line as normal text do into QTextEdit widget. If I try to insert the following HTML code:

    <div>aaa</div><div>bbb</div><div>ccc</div><div>ddd</div><div>eee</div><div>fff</div>

    I have showed into my QTextEdit:

    aaa
    bbb
    ccc
    ddd
    eee
    fff


    On the contrary I woul to have the following:

    aaabbbcccdddeeefff

    and, as standard text editor, if I resize the widget and, for example, decrease the width the div blocks should show as follow:

    aaabbbcccddd
    eeefff


    Do you know if is possible to reach such result?

    Thank you

  2. #2
    Join Date
    Sep 2013
    Posts
    1
    Qt products
    Qt4

    Default Re: QTextEdit and HTML div line aligned

    div - is a block tag.
    just use span instead of div

    or add to div attribute style with display inline option
    <div style="display: inline;"/>

Similar Threads

  1. How do I set a QTextEdit to a specific line by line number?
    By Coolname007 in forum Qt Programming
    Replies: 8
    Last Post: 1st February 2013, 05:18
  2. QTextEdit HTML QCheckBox?
    By cyberduck in forum Qt Programming
    Replies: 2
    Last Post: 2nd February 2012, 12:48
  3. QTextEdit insert html
    By abrahametalero in forum Newbie
    Replies: 4
    Last Post: 12th February 2011, 18:58
  4. QTextEdit and Html
    By giusepped in forum Qt Programming
    Replies: 1
    Last Post: 28th October 2008, 17:20
  5. put html text into a qtextedit
    By dreamer in forum Qt Programming
    Replies: 2
    Last Post: 8th May 2008, 19:44

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.