I am trying to print a report using QTextDocument, one of the challenges I face now is how to insert two parallel QTextTable, one in the right and the other in the left.
See the image in the attachment, 1 and 2 should be QTextTable.
I am trying to print a report using QTextDocument, one of the challenges I face now is how to insert two parallel QTextTable, one in the right and the other in the left.
See the image in the attachment, 1 and 2 should be QTextTable.
Did you solve the problem? I need to do something similar.
Since the OP hasn't posted anything here in 4 years, I wouldn't waste too much time waiting for a reply...
<=== 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.
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.
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 19: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.
Thanks, I'll try it. I'll come back with the results.
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).
d_stranz (25th November 2017)
Bookmarks