Ah..Sorry made a personal post :)
---------- Forwarded message ----------
From: Gopalakrishna Bhat <[email protected]>
Date: Fri, Jan 13, 2012 at 6:31 PM
Subject: Re: [Interest] programatically adding a list to a QTextDocument
To: Graham Labdon <[email protected]>
QTextCursor has insertBlock method that you can use to insert into the
document.
One way of adding a block to the document is
QTextCharFormat textCharFormat = cursor.blockCharFormat();
QTextBlockFormat blockFormat;
cursor.insertBlock(blockFormat,textCharFormat);
cursor.insertText("Text to be inserted");
Then you get that block and then use that in QTextList::add . Hope this
helps.
Gopalakrishna
On Fri, Jan 13, 2012 at 5:40 PM, Graham Labdon <
[email protected]> wrote:
> Hi****
>
> I want to add a QTextList to a document.****
>
> I see that I can do this using QTextCursor::insertList.****
>
> This returns a pointer to the new list but I cannot see a way to add
> items to the list.****
>
> QTextList has an ‘add’ method that takes a QTextBlock but I cannot see how
> to create a text block with the desired text for the list entry****
>
> ** **
>
> Any help is appreciated****
>
> Graham ****
>
> ** **
>
> _______________________________________________
> Interest mailing list
> [email protected]
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
--
My blog http://gkbhat.blogspot.com
--
My blog http://gkbhat.blogspot.com
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest