I'm coding a custom editor with a QTextLayout. Two questions:

1. It looks like the only way to insert text is to call setText() with a new string. But this invalidates the layout. Do I need to reconfigure the layout every time the user presses a key?

2. The setPreeditArea() function sets the position and text of the area processed before editing occurs. How is this function useful? What "editing" is the layout doing?

Thanks,
Zack