PDA

View Full Version : QTextList starting value



'milimoj
25th May 2015, 15:25
Is there a way to set custom start value for QTextList with ListDecimal style?
I have one scene with multiple QGraphicTextItem-s but I wish to allow numbered text list to propagate through more then one item. As QTextList take QTextDocument for parent this is not possible.
I can do a "don't do" thing and add block from one item to list from the other but still number of first block in item is always 1.

wysota
26th May 2015, 08:38
What is a start value?

Do you mean QTextListFormat::setNumberPrefix()?

ChrisW67
26th May 2015, 12:37
I think the OP wants two independent (separated) QTextLists where the numbering in the second continues from the number at the end of the first. To do this the second QTextList needs to start counting entries from a number other than one. I cannot see a way to start number from, for example, 5.

'milimoj
26th May 2015, 14:58
I think the OP wants two independent (separated) QTextLists where the numbering in the second continues from the number at the end of the first. To do this the second QTextList needs to start counting entries from a number other than one. I cannot see a way to start number from, for example, 5.

Yes. This is exatly what I am talking about. This functionality seams to be something that should be standard for me.

'milimoj
1st June 2015, 10:27
I hope that this functionality shall be added in class in next release. It is a trivial functionality for adding in Qt private class and a pain in the .... for implementing from scratch when needed.

wysota
1st June 2015, 10:57
I hope that this functionality shall be added in class in next release. It is a trivial functionality for adding in Qt private class and a pain in the .... for implementing from scratch when needed.

Feel free to add it to the code and send it to review. With decent enough code it should quickly be accepted.