Instead of hardcoded value 10, I would prefer a number based on QFontMetrics.

~~~
QFontMetrics fm(ui->plainTextEdit->font());
ui->plainTextEdit->setTabStopWidth(options->tabWidth()*fm.width(' ');
~~~