Results 1 to 8 of 8

Thread: Inserting two parallel QTextTable inside QTextDocument

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2017
    Posts
    6
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanked 1 Time in 1 Post

    Default Re: Inserting two parallel QTextTable inside QTextDocument

    You're right. I do not want to open a new thread, because my problem is the same.
    I need to put tables in a row, until now I have tried unsuccessfully placing frames, but they are always located one on top of the other.
    I wonder if it is possible to do it in some way.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,348
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    318
    Thanked 872 Times in 859 Posts

    Default Re: Inserting two parallel QTextTable inside QTextDocument

    Why not try making a table with as many columns as both tables combined? Put the columns of table 1 into the first "n" columns of the big table, and put the columns of table 2 into the next "m" columns. You could add a padding column in between the two tables with the appropriate width.

    Alternatively, since QTextDocument uses Rich Text Format (a subset of HTML), you could just insert HTML directly, as in this post.
    Last edited by d_stranz; 22nd November 2017 at 20:16.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Nov 2017
    Posts
    6
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanked 1 Time in 1 Post

    Default Re: Inserting two parallel QTextTable inside QTextDocument

    Thanks, I'll try it. I'll come back with the results.

  4. #4
    Join Date
    Nov 2017
    Posts
    6
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanked 1 Time in 1 Post

    Default Re: Inserting two parallel QTextTable inside QTextDocument

    Ok, I figured out. I create a "Main Table" with two columns and one row, resulting in a table with two cells. Then, I put the cursor in each cell and insert the necessaries tables inside the cells.

    The result is in the attached image (without formatting).
    Attached Images Attached Images

  5. The following user says thank you to Melkorniano for this useful post:

    d_stranz (25th November 2017)

Similar Threads

  1. Problem inserting items inside TreeWidget
    By hakermania in forum Newbie
    Replies: 14
    Last Post: 4th May 2011, 19:57
  2. Inserting label inside textEdit widget
    By dshan in forum Qt Programming
    Replies: 1
    Last Post: 11th January 2011, 12:17
  3. Inserting links in QTextDocument
    By deca5423 in forum Qt Programming
    Replies: 1
    Last Post: 9th April 2010, 03:19
  4. Progress Bar set value inside OpenMP parallel for
    By lixo1 in forum Qt Programming
    Replies: 2
    Last Post: 18th February 2010, 20:51
  5. Insert SVG inside QTextDocument
    By giusepped in forum Qt Programming
    Replies: 6
    Last Post: 23rd April 2009, 20:57

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.