Hi,

setting tabstops on QTextOption using the setTabArray() method has no effect. When using setTabStop() it works.

Example code:

Qt Code:
  1. TabTest::TabTest(QWidget *parent, Qt::WFlags flags)
  2. : QMainWindow(parent, flags)
  3. {
  4. ui.setupUi(this);
  5.  
  6. QTextEdit *edit = new QTextEdit(this);
  7. setCentralWidget(edit);
  8.  
  9. QTextDocument* doc = new QTextDocument( parent );
  10. QTextOption textOptions = doc->defaultTextOption();
  11.  
  12. // textOptions.setTabStop(200.0); // works
  13. QList<qreal> tabs;
  14. tabs << 200.0;
  15. textOptions.setTabArray(tabs); // No effect, default 80px
  16. doc->setDefaultTextOption( textOptions );
  17.  
  18. doc->setPlainText( "Hello\tWorld" );
  19. edit->setDocument( doc );
  20. }
To copy to clipboard, switch view to plain text mode 

I would like to set tabstops that a not equal spaced.

I'm using Qt 4.8.1 on Win7.

Thanks for any help

Helmut