Results 1 to 2 of 2

Thread: Table in TextEdit

  1. #1
    Join Date
    Oct 2010
    Posts
    54
    Thanks
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Question Table in TextEdit

    Hi all I have a table view (model based) which I wish to display in my Textedit (Rich text).

    Is there an easy way (or any way at all) to display the records of the table in a textedit? I'm stuck on this so may need some guidance.

    Thanks for your time and trouble.

  2. #2
    Join Date
    Jan 2009
    Location
    The Netherlands and Spain
    Posts
    150
    Thanks
    6
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Table in TextEdit

    You can use setHtml to feed it some html like this:
    Qt Code:
    1. myTextEdit.setHtml("<table><tr><td>text in column1</td><td>more text in column2</td></tr></table>");
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Edit table for my own table-widget
    By MasterMatrix in forum Qt Programming
    Replies: 0
    Last Post: 1st December 2010, 08:05
  2. textedit
    By limeir in forum Qt Programming
    Replies: 1
    Last Post: 13th July 2010, 11:27
  3. Replies: 5
    Last Post: 3rd April 2010, 05:07
  4. Table Widget Vs. Table View
    By winston2020 in forum Qt Programming
    Replies: 2
    Last Post: 19th October 2008, 10:56
  5. Replies: 9
    Last Post: 21st June 2007, 11:27

Tags for this Thread

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.